Hi. Hope someone can shed some light on my dilemma.
I am working against Nav 2016, and doing simple JSON/Rest webservcie calls. I am using Postman for testing fucntionality.
I can successfully create a SalesOrder by doing a POST to .../OData/Company('mycompany')/SalesOrder. But when I try to create the SalesOrderLines using the recommended methods I get errors that I can not resolve.
The URL structure I am attemting use is ...OData/Company('mycompany')/SalesOrder('1063')/SalesOrderLines
The 1063 is the SalesOrder number I got from creating my SalesOrder. The JSON schema looks like this:
{
"Type": "Item",
"TypeSpecified": true,
"No": "11444",
"Quantity": 1,
"QuantitySpecified": true
}
i.e. just trying to add one line. I however get this error no matter what I try
{
"odata.error": {
"code": "",
"message": {
"lang": "en-US",
"value": "The number of keys specified in the URI does not match number of key properties for the resource 'NAV.SalesOrder'."
}
}
}