Assign role to a Team

Same as Users, Teams can be used to assign roles. This is used mostly for Owner Teams, which should have the right privileges over the records that they own. Find below a method to assign roles to a Team

/// Assign Role to the specified team
public void Assign_Role_Team(Guid Team_ID, EntityReference Role, IOrganizationService Service)
                     new Relationship("teamroles_association"),
                     new EntityReferenceCollection() { Role });

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s