Reputation: 130
I am making a short program to update values in Dynamics CRM 2016 through the web API however, the examples from Microsoft always use the account guid such as,
PATCH [Organization URI]/api/data/v8.1/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
The problem is that the users are already created and I don't have their GUID values.
Is it possible to update account's details based on say email address value if it's unique? Can I pass the email value instead of the GUID? If no, what would you recommended doing, something like get request for all account GUIDs and email addresses and then locally map them to create appropriate requests with guid?
Would this be relevant when we talk about big amount of accounts(in millions)?
Upvotes: 0
Views: 946
Reputation: 15128
First of all tou are using the new Web API, keep in mind that if you are developing with .NET you can use the SDK dlls, in my opinion they are easier to use.
Normally you can't use the email address instead of the record id (accountid in your case) BUT your version of Dynamics CRM (2016) supports alternate keys and eventually you can set the email field (emailaddress1) to be a key, more information here: LINK
Right now I don't have an example of alternate keys with Web API, and googling some links pointed to some issues, you need to try out by yourself
Upvotes: 2