Skip to main content

Notifications

Announcements

No record found.

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

Error when trying to create an association with Create Entity

Posted on by 5

Hi there, 

I'm using the Dynamics REST Web API to try and create + associate an entity per documentation here: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/associate-disassociate-entities-using-web-api

However I am running into an error that I'm struggling to understand. 

Here is the request I'm trying to make:

https://drops.tray.io/12uNO5D2

And here is the response I get back from the api:

https://drops.tray.io/yAuYoWYy

Any ideas why I could be getting this error and what this error means?

Thanks, 

Ali

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Error when trying to create an association with Create Entity

    Hi,

    I would suggest you to use Rest Builder link provided below to generate Rest Web API code. That way you will zero percentage chance of making an error.

    github.com/.../releases

    It is a managed solution which you can install in your instance.

    Please mark my answer verified if I were helpful!

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Error when trying to create an association with Create Entity

    Hello,

    I see few potential issues in your code. Here is the post that I used as an example - stackoverflow.com/.../create-annotation-via-crm-web-api

    Question - what type of the record you are trying to create record for - is it regular contact?

    Then line with reference should look like following:

    'objectid_contact@odata.bind': '/contacts(C5DDA727-B375-E611-80C8-00155D00083F)'

    if you have some custom entity with the schema name msdyn_contactpricelist then your line should look like:

    'objectid_msdyn_contactpricelist@odata.bind': '/msdyn_contactpricelists(C5DDA727-B375-E611-80C8-00155D00083F)'

    Good luck.

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans