Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have two entities: "new_majorations" and "contacts". I have also an entity for the relations between the two: "new_contact_new_majorationset."
How can I use the Web Api to create a new entry in "new_contact_new_majorationset" (so a new relation beetween "new_majorations" and "contacts")?
The link you posted is for one to many relationships.
Anyway, I did try it, but I got the error "Unmapped Request found".
This was the POST request:
I think you missed /$ref in the post url.
This worked for me:
POST https://treecatoct2017.crm3.dynamics.com/api/data/v8.2/accounts(36859222-06AE-E711-A94C-000D3AF3E34A)/new_account_contact/$ref HTTP/1.1 Content-Type: application/json Accept: application/json OData-MaxVersion: 4.0 OData-Version: 4.0
Where new_account_contact is an N:N relationship.
If I put "/$ref" I got the error message: "The URI segment '$ref' is invalid after the segment 'new_contact_new_majorationset'".
And if I used "new_contact_new_majoration" instead of "new_contact_new_majorationset" I got the error message "Bad Request - Error in query syntax."
Heh.. try removing that extra ")"
I discovered that I had a double parenthesis in the end of the request. Removing it I got the error message "Invalid role specified for entity 'new_majoration'in relationship 'new_contact_new_majoration.Referencing".
I just succeeded by inverted the entities: so I put the contacts in the url and new_majorations in the body.
Thanks for your help!
Interesting.. I just got the same error with my contact-accounts when I switched the entities.. Good to know.
Business Applications communities