Hi all,
Greetings!
I could use some help here.
I am trying to update a sales order using its document service.
When I try the code mentioned here (or my own code for that matter) I get "Entity update mode must be specified".
I am not sure where to mention the updateMode.
SalesOrderDocuService.KeyField keyField = new SalesOrderDocuService.KeyField() { Field = "SalesId", Value = _salesId }; SalesOrderDocuService.EntityKey entityKey = new SalesOrderDocuService.EntityKey(); entityKey.KeyData = new SalesOrderDocuService.KeyField[1] { keyField }; SalesOrderDocuService.EntityKey[] entityKeys = new SalesOrderDocuService.EntityKey[1] { entityKey }; SalesOrderDocuService.SCA_AxdSalesOrderServiceClient _Client; using (_Client = new SalesOrderDocuService.SCA_AxdSalesOrderServiceClient()) { SalesOrderDocuService.CallContext _callContext = new SalesOrderDocuService.CallContext(); _callContext.Company = axCompanyName; SalesOrderDocuService.AxdSCA_AxdSalesOrder _SalesOrderList = _Client.read(_callContext, entityKeys); SalesOrderDocuService.AxdEntity_SalesTable _SalesOrderTable = _SalesOrderList.SalesTable.First(); SalesOrderDocuService.AxdEntity_SalesLine SalesLine = _SalesOrderTable.SalesLine.First(); decimal newQty = 3; SalesLine.SalesQty = newQty; _Client.update(_callContext, entityKeys, _SalesOrderList); }
Regards,
Abhinay
*This post is locked for comments