Access Team is used to share records. There was a scenario for a POC where the system has 2 Business Units London & Manchester. I wanted to share a record of BU Manchester to another user whose BU was London. To achieve the above requirements I created Access team.
Step 1. Create an Access Team
How to create an Access Team?
There is a Project entity and the record of that project entity has to be shared with another user. It can be done using the Access Team.
To set up an access team we need to enable it at the entity level.
2. Create Access Team Template
After enabling the access team create an Access team template. Navigate to Settings -> Security -> Access Team Templates.
Create a new Team template and assign the permissions.
3. Add a new subgrid
Add a sub-grid of the User entity on the form. In our case, we will add a sub-grid to the project entity. In the Data source section choose the user’s entity and in the default view select ‘Associated Record Team Members’. The team template will automatically populate.
The sub-grid will be added to the form. And the users can be added to that sub-grid.
I setup all these things correctly but while adding a user in the Access team I was getting the below error.
Access Team Error (Resolved) – The user can’t be added to the team because the user doesn’t have the “{0}” privilege.
After doing an analysis, I found that the share permission was not given on the project entity to the security role assigned to the users.
I have added the share privilege for the role ‘AKM_Salesperson’. Now I can add the users in the access team.
The root cause of the error was that for the role that was assigned to the user, you should have at least user-level permission for all the privileges on the entity for which you have enabled the access team.
Read: How to write and execute JavaScript in Dynamics CRM?