i am trying to create SO in business central using OData.
here is my code
NAV con = BCConnection.connect();
SalesOrderHeader aa = new SalesOrderHeader
{
Number="123",
CustomerNumber = "C1002",
BillToCustomerNumber = "C1002"
};
con.AddObject("salesOrderHeaders", aa);
con.SaveChanges();
with this code its giving error
|
Name |
Value |
Type |
|
InnerException |
"{\"error\":{\"code\":\"Application_DialogException\",\"message\":\"You may not enter numbers manually. If you want to enter numbers manually, please activate Manual Nos. in No. Series S-ORD. CorrelationId: 1756ebb5-dee8-42a5-a033-9a41cc263130.\"}}" |
System.Exception {Microsoft.OData.Client.DataServiceClientException} |
but if i try without Number
its saying Number cannot be null