CRM Import Data Wizard of Team Failed with "Could not retrieve salesperson role" Error Message

Today, a colleague of mine tried to import the team data exported from Development environment into the UAT environment using CRM out of the box Import Data Wizard.

The import was failed with the following error message “Could not retrieve salesperson role” even though there was no salesperson role assigned to those roles in Development environment. Actually, those unused OOTB security roles like Salesperson role have been deleted in both Dev and UAT environments.
I’ve searched about this issue online a bit and I’ve found out about the behaviour of CRM OOTB Import Wizard in this blog post from Magnetism.

Here are some of the lines quoted from that blog

  • The "Salesperson" role was automatically assigned to all imported Teams.
  • The automatic assignment of the Salesperson Security Role does not happen when you create Team records manually.
  • All teams imported will be automatically assigned a default security role of Salesperson (even if the Security Role has been renamed)
  • The import will fail if you deleted the Salesperson security role.
  • Also you cannot import Access teams (even though you have the option on the Template) - you will get the following error


One comment in that blog mentioned that he also encountered such error and he was able to recreate the Salesperson role through some SQL "magic." (which I believe is updating the GUID values)
Such “SQL magic” will only work on on-premises environment and one must know what values to be updated.
So, the easier solution that I recommend is to export and import the OOTB Salesperson role from one of the CRM environment with the same version. You can create one new organization from deployment manager if that role has been deleted from all environments.
If the security is not being used, you can rename it to something obvious one like “(Do not use. For Team import purpose only) Salesperson” not to confuse about the existence of the role.

So, the moral of the story is not to delete any of the out-of-the-box components even if the whole CRM environment is customised as XRM system and none of the components are being used.
Components like Forms, Views, etc. can be deactivate. Some components like Reports can be hidden away by updating the filter of the default view.
For those components like Security Role which cannot be done either of them, it’s better to rename with obvious prefix to avoid confusion.

Update:
One of the readers shared another tip to add role template ID to your role through SQL (if yours is on-premises environment):

UPDATE RoleBase
SET RoleTemplateId = (
SELECT RoleTemplateId
FROM RoleTemplate
WHERE Name = 'Salesperson'
)
WHERE RoleId = '00000000-0000-0000-0000-000000000000' -- Change it to your role id

Comments

  1. Hi,
    You just need to add role template id to your role through SQL:

    UPDATE RoleBase
    SET RoleTemplateId = (
    SELECT RoleTemplateId
    FROM RoleTemplate
    WHERE Name = 'Salesperson'
    )
    WHERE RoleId = '00000000-0000-0000-0000-000000000000' -- Change it to your role id

    ReplyDelete
    Replies
    1. Thanks for sharing another way to fix the issue

      Delete
  2. Replies
    1. Thanks. I'm glad it's helpful for the readers.

      Delete

Post a Comment

Popular Posts