I have been able to create a contact in Dynamics WebAPI using a payload similar to this ...
{
"firstname": "asd",
"lastname": "asd"
}
I have been able to create an Account entity in Dynamics WebAPI using a payload similar to this ...
{
"name":"SOLE TRADER ORG",
"emailaddress1":"otbpostman1@post.com",
"telephone1":"07188888"
}
and a Connection entity between the two as follows ...
{
"record1roleid@odata.bind":"/connectionroles(1EB54AB1-58B7-4D14-BF39-4F3E402616E8)",
"record2roleid@odata.bind":"/connectionroles(35A23B91-EC62-41EA-B5E5-C59B689FF0B4)",
"record1id_contact@odata.bind":"/contacts(645f6455-8f1d-e911-a847-000d3ab4f534)",
"record2id_account@odata.bind":"/accounts(233cf761-8f1d-e911-a847-000d3ab4f534)"
}
According to this page I should be able to do a deep insert where I can atomically create all three in one request, I have tried the following ...
{
"record1roleid@odata.bind":"/connectionroles(1EB54AB1-58B7-4D14-BF39-4F3E402616E8)",
"record2roleid@odata.bind":"/connectionroles(35A23B91-EC62-41EA-B5E5-C59B689FF0B4)",
"record1id_contact": {
"firstname": "asd",
"lastname": "asd"
},
"record2id_account": {
"name":"SOLE TRADER ORG",
"emailaddress1":"otbpostman1@post.com",
"telephone1":"07188888"
}
}
... as well a bunch of variations around this but with no luck. I keep getting errors of type ...
"code": "0x80048210", "message": "Both objects being connected are missing."
Have I missed some key feature that means this is or is not possible?