Hello ..
i need to update custAccount in specified sales order so
public void SalesOrderHeaderM() { KeyField keyField = new KeyField() { Field = "SalesId", Value = "EGC-231739" }; EntityKey entityKey = new EntityKey(); entityKey.KeyData = new KeyField[1] { keyField }; EntityKey[] entityKeys = new EntityKey[1] { entityKey }; SalesOrderServiceClient _Client; using (_Client = new SalesOrderServiceClient()) { CallContext _callContext = new CallContext(); _callContext.Company = "egc"; AxdSalesOrder _SalesOrderList = _Client.read(_callContext, entityKeys); AxdEntity_SalesTable _SalesOrderTable = _SalesOrderList.SalesTable.First(); _SalesOrderTable.CustAccount = "C-060414"; _SalesOrderTable.action = AxdEnum_AxdEntityAction.update; _SalesOrderTable.actionSpecified = true; _Client.update(_callContext, entityKeys, _SalesOrderList); }
but when app start i got an error
all fields enabled in data policies ..
also ,can and one tell me what _SalesOrderList.SalesTable.First(); means ?
any help ..
*This post is locked for comments
resolved by next
_SalesOrderTable.PurchOrderFormNum = "645645";
_SalesOrderTable.SalesLine = null;
_SalesOrderTable.TableDlvAddr = null;
Thanks
now i can say after test the code with other AOS , this message is not related to read()
--
Here is details of the exception in Visual Studio
Exception:Thrown: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException) A System.IO.FileNotFoundException was thrown: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Time: 2/10/2019 12:40:34 PM Thread:<No Name>[14788] Exception:Caught: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException) A System.IO.FileNotFoundException was caught: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Time: 2/10/2019 12:40:34 PM Thread:<No Name>[14788] Exception:Thrown: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException) A System.IO.FileNotFoundException was thrown: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers' or one of its dependencies. The system cannot find the file specified." Time: 2/10/2019 12:40:34 PM Thread:<No Name>[14788] Exception:Caught: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers' or one of its dependencies. The system cannot find the file specified." (System.IO.FileNotFoundException) A System.IO.FileNotFoundException was caught: "Could not load file or assembly 'AXSalesIntegration.XmlSerializers' or one of its dependencies. The system cannot find the file specified." Time: 2/10/2019 12:40:34 PM Thread:<No Name>[14788] Exception:Thrown: "Request Failed. See the Exception Log for details." (System.ServiceModel.FaultException`1) A System.ServiceModel.FaultException`1 was thrown: "Request Failed. See the Exception Log for details." Time: 2/10/2019 12:40:37 PM Thread:<No Name>[14788] Exception:Caught: "Request Failed. See the Exception Log for details." (System.ServiceModel.FaultException`1) A System.ServiceModel.FaultException`1 was caught: "Request Failed. See the Exception Log for details." Time: 2/10/2019 12:40:37 PM Thread:<No Name>[14788] Exception:Thrown: "Request Failed. See the Exception Log for details." (System.ServiceModel.FaultException`1) A System.ServiceModel.FaultException`1 was thrown: "Request Failed. See the Exception Log for details." Time: 2/10/2019 12:40:37 PM Thread:<No Name>[14788] Debugger:Stopped at Exception: HandleReturnMessage An exception was caught by the debugger, and user settings indicate that a break should occur. Time: 2/10/2019 12:40:37 PM Thread:<No Name>[14788] Debugger:Exception Intercepted: SalesOrderHeaderM, Form1.cs line 56 An exception was intercepted and the call stack unwound to the point before the call from user code where the exception occurred. "Unwind the call stack on unhandled exceptions" is selected in the debugger options. Time: 2/10/2019 12:40:38 PM Thread:<No Name>[14788]
Thanks
Are you sure that these messages are related to your problem with read() mentioned above?
By the way, do you know what you can also debug document services? (Although I would first look at details of the exception in Visual Studio.)
when i tested it on other AOS i got an exception
first exception when sales order is empty liens
second and third when sales orders has liens
Just knowing that there is some error isn't good enough - look at what actually failed.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156