I am trying to POST
the below json using the Microsoft Dynamics WebAPI. The post returns a success, but in my data the ccseq_employeeid and ccseq_clientid are not set. What do I need to change to get the fields to post correctly?
Entity Structure
ccseq_expensetransaction
has a lookup to ccseq_expensetransactionsets
with a relationship that has the name ccseq_ccseq_expensetransactionset_ccseq_expensetransaction_ExpenseTransactionSetID
. The lookups to systemusers
and ccseq_clients
are a part of the ccseq_expensetransaction
entity.
Code
POST /api/data/v8.0/ccseq_expensetransactionsets HTTP/1.1
Host: url.com
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 24f7ead3-0307-996f-f45a-f959c604c922
{
"ccseq_importdate":"2017-06-05T04:00:00Z",
"ccseq_month":"1",
"ccseq_year":"2017",
"ccseq_name":"Test 30",
"ccseq_status":"100000000",
"ccseq_ccseq_expensetransactionset_ccseq_expensetransaction_ExpenseTransactionSetID":[
{
"ExpenseTransaction[ccseq_employeeid@odata.bind]":"/systemusers(6d2fd71b-32d1-dd11-a4f5-001a6449bbe7)",
"ExpenseTransaction[ccseq_clientid@odata.bind]":"/ccseq_clients(663ebd00-73b9-4faf-90ed-f56bb9c2dc9b)"
}
]
}