Introduction
This article is about fixing “Duplicate Record Found for Entity error” in Dynamics 365 Portals.
Details
Sometimes Dynamics 365 CE displays a confusing error, for example recently one user got the following error while assigning a Web Role to a user.
This error seems confusing as it’s saying Duplicate error, but when I looked into this issue, I found this issue was occurring because the user was trying to assign an inactive Web role to a portal user.
For example, in the below first screen, you can see the Partner Manager web role is inactive but when you click on the Add Existing button under contact to assign Web Roles to the user it will still show you an inactive web role.
In order to solve this issue, I simply modified the filter in the lookup view using the following steps.
- Create your custom solution and add a Web Role entity under that solution or open the default solution.
- Navigate to Web Role entity:Views and open Web Role Lookup view
Click on Edit Filter Criteria and add filter for status equal to Active
Save and Publish
Save and publish your changes
Now we should not be able to see inactive web roles while trying to assign web roles to portal users.
This way we can hide inactive records to show on the lookup view. Stay tuned for more Dynamics 365 content!!