MS-CRM On-Premise Access Team Error – “The name for this record conflicts with an existing record name. You must use unique name”

Hello and Welcome.

To know what is access teams and how it works please refer below link
https://www.inogic.com/blog/2013/10/access-teams-in-crm-2013/

Recently while working on CRM On-Premise Environment i faced one issue and solution was no where on internet.

1. Issue Background :
> We have accounts and access teams.
> Through access teams we are giving access to user at record level.
> So, if there are accounts as Google and Microsoft and If user needs access only on Google account and not on Microsoft,
We explicitly add user to access teams of account.


2. Issue Reported :
> While adding user to access teams we found that some accounts are giving some wired error.
> We have no plugin or workflow or any customization done for access teams.
> Still it was throwing this Following Error.


“The name for this record conflicts with an existing record name. You must use unique a name”

The name for this record conflicts with an existing record name. You must use a unique name

Search on Google with this error, you wont be able to find any single link for this.

> We did some analysis over POA(Principle Object Access) and team table of CRM.
found some strange behavior,
> Expected is : When first time user gain access via access team
CRM internally create record in POA table but only first time when user is added to access teams
> Corresponding records for other users including first one is created in Team table internally by CRM.
> So for our issue where are getting “The name for this record conflicts with an existing record name. You must use unique name” Error.

I analysed,
First analysis – For this there was no record in POA table which is technically correct as User was never added in access team for this account.
Second analysis- For this same account Id, record was created in teams table which is strange, As User was never added in access team for this account and how record got created in team table but not in POA.
Third analysis :Then we checked the mapping field between team and POA which is regarding id and that was null for this team record.

On -N-All : We suspect, this is some technical glitch.
We add user to access teams via SDK also through plugin. so may be due to some network issue or something, Record got created in Teams but not in POA.

Finally Solution :

We deleted those records from team table where regarding id is null.
As there should be no such case where regarding ID is null.
After deletion of records in teams table we try to add user to access teams and it worked and new entry was made in POA and teams both.

Following is the SQL Query to know if record is created in teams table of not for Specific account id.

select teamid from team where name like '30C20B80-117E-E111-A9F2-001A643446E0%'

Following is the SQL Query to know if there are any record in teams table where regarding object id is null

select  teamid from team where RegardingObjectId is  null and  name like '%+%'


Note : Name filter to get only access teams records, as this table contains owner team records as well.

Leave a comment