Set Entity Teams

Updates Team Set for a Record. Use it whenever it is needed to completely update team_set_id for the record, not just add or remove.

  • In Sugar each teamset for record consists of two components: team_id as Primary Team and team_set_id as all other teams. Set Entity Teams works with team_set_id only.
  • The recommended approach is to use Set Entity Teams on After Save flowcharts than on Before Save.
  • Do not use Save Entity to preserve team changes. Set Entity Teams applies team changes itself.
  • Despite any changes that might be applied with Set Entity Teams, the standard Sugar logic, which ensures access of Assigned User to a record, works. Let’s say that you created flowcharts and because of its execution teamset for the record do not contain any Team, to which an Assigned user belongs. In this case, standard Sugar behavior adds Assigned Users’ Private Team.

inputs:

entity – input record which teams are needed to update

  • Required: yes

teams ids array – input array or collection of teams for the record or just one ID of the Team. Please note that this input must contain the whole set of teams.

  • Required: yes

outputs:

entity – the record with updated teams.

The following example completely overrides team_set with one Team West:

The following flowchart adds team West to the current set of Teams for Account when Country is changed to the value USA: 

The following flowchart removes team East from the Teams of Account when Country is changed from the value UK (Please note, that team East won’t be removed when it is set as Primary):

N.B. in the examples above collection is converted to the array, but instead of collections, it is possible to use operators from the Array group.

Click to rate this post!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *