当我从 C# 调用 AIF 服务来创建 SO 时,我的 XML 看起来不像我期望的那样
When I call an AIF service from C# to create a SO, my XML doesn't look like I would expect
我正在尝试使用 AIF 在 this general guide from Microsoft 之后从 C# 创建一个基本的 SO。我有两个问题。
我传递的唯一信息是:
// Create instances of the entities that are used in the service and
// set the needed fields on those entities.
AxdEntity_SalesTable salesTable = new AxdEntity_SalesTable();
salesTable.CurrencyCode = "USD";
salesTable.CustAccount = "100003";
salesTable.DeliveryDate = Convert.ToDateTime("1/14/2016");
salesTable.Payment = "Net30";
salesTable.PurchOrderFormNum = "PO";
AxdEntity_SalesLine salesLine = new AxdEntity_SalesLine();
salesLine.ItemId = "44417";
salesLine.SalesQty = 3;
salesLine.SalesUnit = "ea";
这个错误是什么意思? EInvoiceAccountCode 似乎是 SalesTable 上的一个基字段,我尝试 Tools>Application Integration Framework>Update document service
更新 SalesSalesOrder 服务。
Invalid document schema. The following error was returned: The element 'SalesTable' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder' has invalid child element 'EInvoiceAccountCode' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'. List of possible elements expected: 'DlvTerm' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'.
1) 一切都被 Ax 标记为 Nillable(出于多种原因)。 Nillable VS MinOccurs 0
2) 您在请求中传递了一个元素 "EInvoiceAccountCode"。但它期望在该位置有一个 "DlvTerm" 元素。
我正在尝试使用 AIF 在 this general guide from Microsoft 之后从 C# 创建一个基本的 SO。我有两个问题。
我传递的唯一信息是:
// Create instances of the entities that are used in the service and
// set the needed fields on those entities.
AxdEntity_SalesTable salesTable = new AxdEntity_SalesTable();
salesTable.CurrencyCode = "USD";
salesTable.CustAccount = "100003";
salesTable.DeliveryDate = Convert.ToDateTime("1/14/2016");
salesTable.Payment = "Net30";
salesTable.PurchOrderFormNum = "PO";
AxdEntity_SalesLine salesLine = new AxdEntity_SalesLine();
salesLine.ItemId = "44417";
salesLine.SalesQty = 3;
salesLine.SalesUnit = "ea";
这个错误是什么意思? EInvoiceAccountCode 似乎是 SalesTable 上的一个基字段,我尝试
Tools>Application Integration Framework>Update document service
更新 SalesSalesOrder 服务。
Invalid document schema. The following error was returned: The element 'SalesTable' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder' has invalid child element 'EInvoiceAccountCode' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'. List of possible elements expected: 'DlvTerm' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'.
1) 一切都被 Ax 标记为 Nillable(出于多种原因)。 Nillable VS MinOccurs 0
2) 您在请求中传递了一个元素 "EInvoiceAccountCode"。但它期望在该位置有一个 "DlvTerm" 元素。