Question: Using Alternate keys when inserting, updating entities #908
Open
Description
I wonder if it is possible to send POST (inserts) using alternate keys on navigation properties like this:
url: /api/data/v8.2/contacts
method: POST
body: {
"firstname" : "john",
"lastname" : "smith",
"parentcustomerid_account@odata.bind" : "/accounts(blg_alternatekey='blg12345')"
}
I am currently using class model which is converted to dictionary by standard functionality so the json being generated is like this
url: /api/data/v8.2/contacts
method: POST
body: {
"firstname" : "john",
"lastname" : "smith",
"parentcustomerid_account@odata.bind" : "/accounts(00000000-0000-0000-0000-000000000001)"
}
Would it be possible to still using class model but force to use alternate key instead of navigation property's entity key ?
Regards,
Sebastian
Metadata
Assignees
Labels
No labels