我尝试使用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服务。
无效的文档架构。返回以下错误:元素' SalesTable'在命名空间' http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'具有无效的子元素' EInvoiceAccountCode'在命名空间' http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'。预期的可能元素列表:' DlvTerm'在命名空间' http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'。
答案 0 :(得分:1)
1)Axe将所有东西标记为Nillable(由于多种原因)。 Nillable VS MinOccurs 0
2)您正在传递元素" EInvoiceAccountCode"在你的请求中。但它期待一个" DlvTerm"该位置的元素。