Axapta 当我从C#调用AIF服务来创建SO时,我的XML不会';I don’看起来不像我期望的那样

Axapta 当我从C#调用AIF服务来创建SO时,我的XML不会';I don’看起来不像我期望的那样,axapta,dynamics-ax-2012,x++,dynamics-ax-2012-r2,aif,Axapta,Dynamics Ax 2012,X++,Dynamics Ax 2012 R2,Aif,我正在用AIF做实验,从C#following创建一个基本的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();

我正在用AIF做实验,从C#following创建一个基本的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";
  • 为什么当我检查XML时,它似乎传递了大量的额外字段:

  • 这个错误意味着什么?EInvoiceAccountCode似乎是SalesTable上的一个基本字段,我尝试了
    Tools>Application Integration Framework>Update document service
    来更新SalesOrder服务

  • 无效的文档架构。返回了以下错误:命名空间“”中的元素“SalesTable”在命名空间“”中具有无效的子元素“EInvoiceAccountCode”。可能元素的列表应为命名空间“”中的“DlvTerm”

    1) Ax将所有内容标记为可为零(有几个原因)

    2) 您正在请求中传递元素“EInvoiceAccountCode”。但它希望在该位置有一个“DlvTerm”元素