Remove Teams

Removes Team or several Teams to the record.

  • In Sugar each teamset for record consists of two components: team_id as Primary Team and team_set_id as all other teams. Remove Teams works with team_set_id only.
    You can work with a Primary Team as with the usual field in Logic Builder using Get/Set Entity Attributes on Before Save.
    For example, when it is needed to remove a Team based on conditions and you do not know where this Team was set – as Primary or not, this challenge could be addressed with two flowcharts:
    • the first one on Before Save ensuring that Team will be removed from the Primary. Please note that the Primary Team must be always set:

    • and the second flowchart on After Save to remove Team for the case when this Team is not Primary (see description of the current operator).
  • The recommended approach is to use Remove Teams on After Save flowcharts than on Before Save.
  • Do not use Save Entity to preserve team changes. Remove Teams applies team changes itself.
  • Despite any changes that might be applied with Remove 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 the entity for which new team must be removed

  • Required: yes

team ids array – input an array or collection of Teams IDs or only one Team ID which must be removed from the record.

  • Required: yes

outputs:

entity – the entity with the removed team(s)

I need to update an entity and change teams; how should I do this?

In one After Save flowchart.

If you add (or remove) Teams and then update the record, any other flowchart that works on team change (for example, if you have implemented logic of teams inheriting from Account to related records) will be triggered.

Otherwise – firstly, update the record, then update the Team – other flowcharts that work on team change won’t be triggered.

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

Leave a Reply

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