Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Update (Patch) Contact using email address instead of contact id

(0) ShareShare
ReportReport
Posted on by
=eeWe have a use case where in we need to update a contact in Dynamics CRM using contact's email address instead of the contact id. Here is what the API documentation says:
 
PATCH [Organization URI]/api/data/v9.0/contacts(contactid)
 
 
Can we do as below:
PATCH [Organization URI]/api/data/v9.0/contacts?emailaddress1=name@yahoo.com
 
Any help would be appreciated.
  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    Update (Patch) Contact using email address instead of contact id
    Hi,
     
    Please check below article to define alternate key for your table 
     
    https://learn.microsoft.com/en-us/power-apps/developer/data-platform/use-alternate-key-reference-record?tabs=webapi
  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    Update (Patch) Contact using email address instead of contact id
    Hi,
     
    You can define alternate key as your Email address field and use below syntax to update contact by email address 
     
    PATCH [Organization Uri]/api/data/v9.2/example_records(example_key1=2)
     
    More details can be found on below link
     
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Update (Patch) Contact using email address instead of contact id
    Hi,
    Unfortunately, it is impossible.
    You must use the contactid, which is a GUID and is unique within that environment.
    So you need use it to find correct record to update it.
    More information:

     
    I hope you can mark my answer verified if it answer your question! If you have any questions, please feel free to contact me.
    Regards,
    Leah
     
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans