This is v9.0
I have a POST request which creates a new contact at: /api/data/v9.0/contacts
{
/customertypecode/: 127840004,
/xx_contractorstatus/: 127840000,
/firstname/: /Wallie/,
/lastname/: /Worker1-7/,
/fullname/: /Wallie Worker/,
/emailaddress1/: /wworker1@test.com/
}
I also have a custom list of nationalities at: /api/data/v9.0/xx_nationalities
The structure of xx_nationalities is:
{
/@odata.context/: https://xxdev.api.[HIDDEN].dynamics.com/api/data/v9.0/$metadata#xx_nationalities/,
/value/: [
{
/@odata.etag/: /W////35347625////,
/_organizationid_value/: /6b47908f-b289-4601-b80c-59667d32deda/,
/xx_sharecoderequired/: true,
/xx_nationalityid/: /297db2c4-15a3-ed11-aad1-0022484257f7/,
/xx_name/: /Afghan/,
/xx_wrsregistrationrequired/: false,
/xx_visarequired/: true,
/statuscode/: 1,
/importsequencenumber/: 20,
/_createdby_value/: /2c738c48-4115-ec11-b6e6-002248412237/,
/modifiedon/: /2023-02-02T16:22:38Z/,
/xx_brprequired/: true,
/_modifiedby_value/: /2c738c48-4115-ec11-b6e6-002248412237/,
/versionnumber/: 35347625,
/createdon/: /2023-02-02T16:22:38Z/,
/statecode/: 0,
/overriddencreatedon/: null,
/_modifiedonbehalfby_value/: null,
/xx_nationalityfullname/: null,
/utcconversiontimezonecode/: null,
/_createdonbehalfby_value/: null,
/xx_iseu/: null,
/timezoneruleversionnumber/: null
}
]
}
/_xx_nationality_value/: /5f7db2c4-15a3-ed11-aad1-0022484257f7/
My suspician is that because our CRM is setup to use //xx_nationalities/ instead of //nationalities/ that this is screwing around the solution of how to target.
I.e. instead of [property]_[entitycollection] eg nationalityid_nationality@odata.bind
we're trying something more like:
xx_nationalityid_xx_nationality@odata.bind
But maybe the singular does work with the prepending xx.
Any help gratefully received!