The Branch field is present in the JSON, but Acumatica ignores it, and says that 'Branch cannot be empty'.
The api endpoint is /acumaticadb/entity/Default/17.200.001, and I am PUTting JSON to /SalesOrder, trying to create a new order.
The branch field is present in the json on the details level. I tried 'Branch' and 'BranchID' on both order header and order details levels, and still getting the same error.
I tried to specify the branch during login request. Still same error during order creation.
The exact text of the error: "PX.Data.PXException: Error: 'Branch' cannot be empty." The stack trace is not very informative, it says error was thrown when it tried to persist the order.
Through the web UI, orders with items can be created just fine, by the same user.
This question is almost idential to /49039152, but there was no resolution there.
EDIT: Did not notice code did not come through, here is the request:
PUT : http://localhost/acumaticadb/entity/Default/17.200.001/SalesOrder
{
"Details": [{
"OrderQty": {"value": "10"},
"BranchID": {"value": "HQ"},
"Branch": {"value": "HQ"},
"InventoryID": {"value": "CONBABY1"}
}],
"CustomerOrder": {"value": "TOYONEILLTEST"},
"LocationID": {"value": "MAIN"},
"CustomerID": {"value": "TOYONEILL"},
"BranchID": {"value": "HQ"},
"Branch": {"value": "HQ"}
}
Branch screenshot: