web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Unable to Setup Email Entity to not Create Duplicate Emails on Create API Call via Web Api

(0) ShareShare
ReportReport
Posted on by

Hello!

I am currently working with trying to prevent duplicate emails being pushed to our system by using a custom field that my team has created and the "From" field in the Email entity.

The instructions I've been following are from this website here: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/manage-duplicate-detection-create-update

I have created a duplicate rule that is able to find duplicates based on if the Custom Field is populated (where I ignore blanks and only do detection on rows that have this value populated) and the From field. When I run a Duplication Detection Job, it is is able to find duplicates and published this Duplication Detection Rule.

pastedimage1599781510071v1.png

I have also enabled the Duplication Detection section in the Email Entity:
pastedimage1599781601508v2.png

When I attempt to add an email via WebAPI call with the following headers:


OData-Version: 4.0
OData-MaxVersion: 4.0
Content-Type: application/json
Accept: application/json
MSCRM.SuppressDuplicateDetection: false

It still continues to allow duplicates into the system. I believe there is something wrong with the Duplication Rule that is allowing these emails to not be picked up, but I'm unsure of why it is not configured correctly.

I cannot use an alternative key because there are emails that will not have this custom field published and it is possible to have get false positive of emails that are duplicates.


Any insight on why this would be happening would be helpful.

I have the same question (0)
  • Suggested answer
    LeoAlt Profile Picture
    16,331 Moderator on at

    Hi Partner,

    I test in my instance and it did create duplicate record without the rule triggered.

    I think it may caused by the assignment way.

    As we know, From is a party list field and when we pass the api request to D365, it does not show as "From", it show as "partyid_systemuser@odata.bind" which may leave the rule unrecognized.

    pastedimage1599793758932v1.png

    I suggest that you could create a custom lookup field related to system user and when choose sender from it, assign the value to From field at the same time. Then you just need to duplicate this custom field and it will work both in D365 and web api.

    Regards,

    Leo 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans