This article is about fixing “Duplicate Record Found for Entity error..” in Dynamics 365 Portals.
This error seems confusing as it’s saying Duplicate error, but when I looked into this issue, I found this issue was occurring because user was trying to assign an inactive Web role to portal user.
For example in below first screen you can see Partner Manager web role is inactive but when you will click on Add Existing button under contact to assign Web Roles to user it will still show you inactive web role.
In order to solve this issue, I simply modified filter in lookup view using following steps.
> Create your custom solution and add Web Role entity under that solution or open default solution.
> Navigate to Web Role entity -> Views and open Web Role Lookup view
> Click on Edit Filter Criteria and add filter for status equals to Active
This way we can hide inactive records to show on the lookup view. Stay tuned for more Dynamics 365 contents !!