Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

POST to Web API using a string-format GUID as alternate key

Posted on by Microsoft Employee

I'm working with the Web API and have encountered an issue with alternate keys.

Here's the scenario:

Contact entity has an alternate key which is a GUID stored as a text field.

I have a POST message which should add the contact to a lookup using this alternate key:

"djb_contactid@odata.bind": "/contacts(djb_identity_username='00000000...etc')"

however, because the value of the text field is a GUID, the POST request returns the following error:

"code": "0x80040217",
        "message": "Contact With Id = 00000000...etc Does Not Exist"


If I attempt a GET with the same key, it works as expected.

GET /api/data/v9.0/contacts(djb_identity_username='00000000...etc')


is this a bug? or some issue with the way its encoded as part of the POST?

 

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans