Hi Experts!
After update SAP to 9.3(9.30.240) PL:14. broken closising some SaleOrder via DI-API.
We get next error:
[RDR1.DiscPrcnt][line: 1] , 'Field cannot be updated (ODBC -1029)
But the same document can be successfully closed through UI-SAP.
If I am trying to update documents through DI without Close( changing nothing in Order) and I get this error too.
Exemle code
private static void CloseOrder(Company _company, int docKey) { SAPbobsCOM.Documents oldDoc = (SAPbobsCOM.Documents)_company.GetBusinessObject(SAP bobsCOM.BoObjectTypes.oOrders); if (!oldDoc.GetByKey(docKey)) { Console.WriteLine("Invalid SaleOrder Key."); return; } oldDoc.Update(); int errCode; string errMsg; _company.GetLastError(out errCode, out errMsg); if (errCode != 0) { Console.WriteLine(errMsg); } else { Console.WriteLine("It is oreder not problem"); } }
Why is this happening?
How can this be fixed?
Thank!