Hello,
Maybe something is wrong with NavigationPropertyBinding.
Take a look to my code, I try to create a contact and bind with an account:
var data =
{
"fistname": "contact mel",
"lastname": "Line",
"parentcustomerid_account@odata.bind": "/accounts(3f749846-ca1b-ea11-a812-000d3a337847)",
}
Xrm.WebApi.createRecord("contact", data).then(
function success(result) {
console.log(result);
},
function (error) {
console.log(error.message);
}
);
So the trick to find the correct NavigationPropertyBinding for the contact entity go to:
https://YourOrganisation.crm.dynamics.com/api/data/v9.0/$metadata#contact/$entity and go to your EntitySet nood, in my case it's contact.
I found the right NavigationPropertyBinding path:
<NavigationPropertyBinding Path="parentcustomerid_account" Target="accounts"/> --> parentcustomerid_account that I use in my JS code.
Hope this helps