How to collect the email addresses for all individual Team Members when their Team is assigned to an Incident/Task/Service Request (other Business Object)

Version 1

    Details

    How to collect the email addresses for all individual Team Members when their Team is assigned to an Incident/Task/Service Request (other Business Object).


    Resolution

    1.   Create a new Text field  under the Business Object you are working with. Make it a large field - 1000+ characters as many email addresses can take up a lot of space.  This field will store the email addresses from the Team members properly  formatted for the email.
    2.   Create a Workflow under that same Business Object to gather the addresses and (optionally) send the email - this way the timing stays correct.
    3.   In that Workflow, create an Update block that will populate the new field you created using the following expression:
    $(ForEachChild("StandardUserTeam#", OwnerTeam_Valid, "Employee#",  "PrimaryEmail + '; '"))

    NOTE:  The Employee# setting may be different for you. It could be 'Profile.Employee#'  or 'Profile#Employee.' That will depend upon when your tenant was created. Play  with it to get the proper value.
    4.   Connect that update block, on success, to the Stop block (or optionally, a Notification or QuickAction block that sends the email)
    5.   Use your newly created field as the To: address in the emails you wish to send.
    6.    The trigger on the workflow should be when the Team is assigned  (created) and updated, if it gets changed. Use the appropriate variables  from the base Business Object to configure this.