{"id":3483,"date":"2018-11-16T06:07:32","date_gmt":"2018-11-16T06:07:32","guid":{"rendered":"http:\/\/himbap.com\/blog\/?p=3483"},"modified":"2018-11-16T06:07:32","modified_gmt":"2018-11-16T06:07:32","slug":"fix-duplicate-record-found-for-entity-error-dynamics-365-portals","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=3483","title":{"rendered":"Fix Duplicate Record Found for Entity error &#8211; Dynamics 365 Portals"},"content":{"rendered":"<p><strong>Introduction<\/strong><br \/>\nThis article is about fixing &#8220;Duplicate Record Found for Entity error..&#8221; in Dynamics 365 Portals.<\/p>\n<p><strong>Details<\/strong><br \/>\nSometime Dynamics 365 CE display confusing error, for example recently one user got following error while assigning a Web Role to user<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3484 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup1-300x141.png\" alt=\"dup1\" width=\"300\" height=\"141\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup1-300x141.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup1-624x294.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup1.png 660w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This error seems confusing as it&#8217;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.<\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3486 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup2-283x300.png\" alt=\"dup2\" width=\"283\" height=\"300\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup2-283x300.png 283w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup2-624x661.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup2.png 673w\" sizes=\"(max-width: 283px) 100vw, 283px\" \/><\/a><\/p>\n<p>In order to solve this issue, I simply modified filter in lookup view using following steps.<br \/>\n&gt; Create your custom solution and add Web Role entity under that solution or open default solution.<br \/>\n&gt; Navigate to Web Role entity -&gt; Views and open Web Role Lookup view<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3487 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup3-300x124.png\" alt=\"dup3\" width=\"300\" height=\"124\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup3-300x124.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup3-1024x422.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup3-624x257.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup3.png 1281w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n&gt; Click on Edit Filter Criteria and add filter for status equals to Active<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3489 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup5-300x61.png\" alt=\"dup5\" width=\"300\" height=\"61\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup5-300x61.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup5-624x126.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup5.png 718w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&gt; Save and Publish your changes<br \/>\nNow we should not be able to see inactive web roles while trying to assign web roles to portal users.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3488 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup4-300x189.png\" alt=\"dup4\" width=\"300\" height=\"189\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup4-300x189.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup4-624x393.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/11\/dup4.png 874w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This way we can hide inactive records to show on the lookup view. Stay tuned for more Dynamics 365 contents !!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This article is about fixing &#8220;Duplicate Record Found for Entity error..&#8221; 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 This error seems confusing as it&#8217;s saying Duplicate error, but when I looked into this issue, I found this issue was&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=3483\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3206,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,522,508],"tags":[674,503,641,672,673],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3483"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3483"}],"version-history":[{"count":3,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3483\/revisions"}],"predecessor-version":[{"id":3491,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3483\/revisions\/3491"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/3206"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}