Inogic is a hub of like minded professionals who believe that innovativeness is the key for providing the most optimum solutions in the SME segment.We are committed to putting our time and efforts to Research and Develop on Dynamics CRM so that you can be benefited by the cutting edge methodologies. We endeavor to share some of our work on this blog by introducing Tips, Tricks and products from our labs.
Navigate to Settings --> Administration --> Access Team Templates
In the Access Template you define the permissions to be assigned to the users selected for this Access Profile
The entity will only list those entities for which the Access Team feature is enabled.
You can create multiple templates for any entity. You can then select appropriate template on the entity form.
Add a subgrid control and set the following properties.
In the Team Template select the Access Template that would like to apply.
Behind the scenes
For every record that you assign team members, a team record is created. So it creates one team per record.
The team type for this record is set to Access
The team name is auto generated by concatenating the entity record + the access template record id.
Programmatically Add/Remove users from a records Access Team
Read the Access Template ID using the Template name.
The entity that stores Access Template is “teamtemplate”
// Query using ConditionExpression and FilterExpression
ConditionExpression condition = new ConditionExpression();
//attribute name add to condition
condition.AttributeName = "teamtemplatename";
//operator add to condition
condition.Operator = ConditionOperator.Equal;
//values added to condition
// filter creation
FilterExpression filter = new FilterExpression();
// create query expression
QueryExpression query = new QueryExpression("teamtemplate");
//filter added to query
//retrieve all columns
query.ColumnSet = new ColumnSet("teamtemplatename");
// execute query which will retrieve the Access team teamplate
accessTeamColl = service.RetrieveMultiple(query);
Add user to the Access Team for a record
//Request to create the Access team and add the user in that access team
AddUserToRecordTeamRequest adduser = new AddUserToRecordTeamRequest()
Record = entityToAdd,
SystemUserId = UserId,
TeamTemplateId = teamTemplateId
// Execute the request.
AddUserToRecordTeamResponse response = (AddUserToRecordTeamResponse)service.Execute(adduser);
Similarly you can use the RemoveUserFromRecordTeamRequest to remove users from a particular records access team.
Posted by: Inogic
For more information/discussions (documents, sample code snippets, detailed work flow or diagrams)
Please be free to visit the following links or email us:
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics