Fix Duplicate Record Found for Entity error – Dynamics 365 Portals

Introduction
This article is about fixing “Duplicate Record Found for Entity error..” in Dynamics 365 Portals.

Details
Sometime Dynamics 365 CE display confusing error, for example recently one user got following error while assigning a Web Role to user
dup1

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.

dup2

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
dup3
> Click on Edit Filter Criteria and add filter for status equals to Active
dup5

> 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.
dup4

This way we can hide inactive records to show on the lookup view. Stay tuned for more Dynamics 365 contents !!

One thought on “Fix Duplicate Record Found for Entity error – Dynamics 365 Portals

  1. Pingback: Fix Duplicate Record Found for Entity error – Dynamics 365 Portals - Microsoft Dynamics CRM Community

Leave a Reply

Your email address will not be published. Required fields are marked *