{"id":1216,"date":"2022-02-23T16:54:00","date_gmt":"2022-02-23T16:54:00","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1216"},"modified":"2022-08-12T16:03:09","modified_gmt":"2022-08-12T16:03:09","slug":"remove-teams","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/remove-teams\/","title":{"rendered":"Remove Teams"},"content":{"rendered":"\n<p><a name=\"abstract\"><\/a>Removes Team or several Teams to the record.<\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<ul>\n<li>In Sugar each teamset for record consists of two components:&nbsp;<em>team_id<\/em>&nbsp;as Primary Team and&nbsp;<em>team_set_id<\/em>&nbsp;as all other teams.&nbsp;<strong><span style=\"color:#ec8f45;\">Remove Teams<\/span><\/strong>&nbsp;works with&nbsp;<em>team_set_id<\/em>&nbsp;only.<br>You can work with a Primary Team as with the usual field in Logic Builder using&nbsp;<strong><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/get-entity-attributes\/\">Get<\/a><\/strong>\/<strong><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/set-entity-attributes\/\">Set Entity Attributes<\/a><\/strong>&nbsp;on&nbsp;Before Save.<br>For example, when it is needed to remove a Team based on conditions and you do not know where this Team was set \u2013 as Primary or not, this challenge could be addressed with two flowcharts:\n<ul>\n<li>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:<br><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-184-114d8497d87642ed950de769485404ef.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-184-114d8497d87642ed950de769485404ef-1024x324.png\" alt=\"\" class=\"wp-image-378\"><br>\n<\/a><\/li>\n<li>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).<\/li>\n<\/ul>\n<\/li>\n<li>The recommended approach is to use&nbsp;<strong><span style=\"color:#ec8f45;\">Remove Teams<\/span><\/strong>&nbsp;on After Save flowcharts than on Before Save.<\/li>\n<li>Do not use&nbsp;<strong><span style=\"color:#ec8f45;\">Save Entity<\/span><\/strong>&nbsp;to preserve team changes.&nbsp;<strong><span style=\"color:#ec8f45;\">Remove Teams<\/span><\/strong>&nbsp;applies team changes itself.<\/li>\n<li>Despite any changes that might be applied with&nbsp;<strong><span style=\"color:#ec8f45;\">Remove Teams<\/span><\/strong>, the standard Sugar logic, which ensures access of Assigned User to a record, works. Let\u2019s 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\u2019 Private Team.<\/li>\n<\/ul>\n<\/div>\n\n\n<p><strong>inputs:<\/strong><\/p>\n\n\n\n<p><span style=\"color:#ef6950;\">entity<\/span> \u2013 input the entity for which new team must be removed<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><span style=\"color:#6888c9;\">team ids array<\/span> \u2013 input an array or collection of Teams IDs or only one Team ID which must be removed from the record.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Required: yes<\/li><\/ul>\n\n\n\n<p><strong>outputs:<\/strong><\/p>\n\n\n\n<p><em><span style=\"color:#ef6950;\">entity<\/span><\/em>&nbsp;\u2013 the entity with the removed team(s)<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-184-f139d9e25c074f52980aa474220185e4.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-184-f139d9e25c074f52980aa474220185e4-1024x431.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p><strong>I need to update an entity and change teams; how should I do this?<\/strong><\/p>\n<p>In one After Save flowchart.<\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-03b4b48212514b91b5b3e67a82b87126.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-03b4b48212514b91b5b3e67a82b87126-1024x239.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<p>Otherwise \u2013 firstly, update the record, then update the Team \u2013 other flowcharts that work on team change won\u2019t be triggered.<\/p>\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-6465b681f37a43279a1ba2b00c0bc977.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/02\/img-183-6465b681f37a43279a1ba2b00c0bc977-1024x253.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<\/div><div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1216' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1216\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-e60a290ba3b64' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-e60a290ba3b64'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1216' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-e60a290ba3b64\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1216\" \n                               id=\"yasr-stats-dashicon-e60a290ba3b64\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-e60a290ba3b64\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-e60a290ba3b64\">0<\/span>  Average: <span id=\"yasr-vv-average-container-e60a290ba3b64\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-e60a290ba3b64' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-e60a290ba3b64' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Removes Team or several Teams to the record. In Sugar each teamset for record consists of two components:&nbsp;team_id&nbsp;as Primary Team and&nbsp;team_set_id&nbsp;as all other teams.&nbsp;Remove Teams&nbsp;works with&nbsp;team_set_id&nbsp;only.You can work with a Primary Team as with the usual field in Logic Builder using&nbsp;Get\/Set Entity Attributes&nbsp;on&nbsp;Before Save.For example, when it is needed to remove a Team based on &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/remove-teams\/\"> <span class=\"screen-reader-text\">Remove Teams<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-1216","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=1216"}],"version-history":[{"count":5,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1216\/revisions"}],"predecessor-version":[{"id":2146,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1216\/revisions\/2146"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1216"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}