Skip to main content

Notifications

Microsoft Dynamics CRM forum
Suggested answer

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

editSubscribe (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,937 Super User 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,937 Super User 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
     
     

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,375 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,308 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans