Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

AX 2012 - AIF - File System Adapter - Sales Order Import - Invalid Child Element

Posted on by 1,345

 Hi,

 

I am getting the following error in the exception log:

 

The request failed with the following error:  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 'ReceiptDateRequested' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'.

List of possible elements expected: 'QuotationId, RecId, RecVersion, Reservation, RetailChannel, RetailHourOfDay, SalesId, SalesName, SalesOriginId, SalesPoolId, SalesStatus, SalesType, SalesUnitId, SettleVoucher, ShipCarrierDlvType, ShipCarrierName, ShipCarrierPostalAddress, ShippingDateConfirmed, ShippingDateRequested, smmCampaignId, smmSalesAmountTotal, TotalBalance, TotalCashDiscount, TotalInvoice, TotalMiscCharges, TotalSalesTax, URL, WorkerSalesResponsible, WorkerSalesTaker, TableDlvAddr, TableCarrierAddr, SalesLine, DocuRefHeader, MarkupTransHeader, CreditCardAuthTrans' in namespace 'http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder'.  

 

My XML file is this:

 

<?xml   version="1.0" encoding="utf-8" ?>
<Envelope   xmlns="http://schemas.microsoft.com/dynamics/2011/01/documents/Message">
<Header>
    <MessageId>{5603D03A-4380-404D-9F27-738BE0FEA931}</MessageId>
    <Company>GPL</Company>
    <Action>http://schemas.microsoft.com/dynamics/2008/01/services/SalesOrderService/create</Action>
</Header>
    <Body>
      <MessageParts>
        <SalesOrder   xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/SalesOrder">
          <SalesTable class="entity">
            <CustAccount>EXPR01</CustAccount>
            <DeliveryDate>2013-05-04</DeliveryDate>
            <PurchOrderFormNum>PO</PurchOrderFormNum>
            <ReceiptDateRequested>2013-05-09</ReceiptDateRequested>
            <SalesLine class="entity">
            <ItemId>A070</ItemId>
              <SalesQty>18</SalesQty>
              <SalesUnit>m</SalesUnit>
            </SalesLine>
          </SalesTable>
        </SalesOrder>
      </MessageParts>
    </Body>
</Envelope>

 I can see no reason why AX should complain about ReceiptDateRequested.

I have tried removing this field and alos removing DeliveryDate but leaving RRD.

 

Any suggestions?

Thanks

*This post is locked for comments

  • Suggested answer
    andy007 Profile Picture
    andy007 380 on at
    RE: AX 2012 - AIF - File System Adapter - Sales Order Import - Invalid Child Element

    The form changes depending of the port category. If it's an enhanced inbound port, you can check 'customize documents', if it's a system or basic port, then you can't.

    Until now I didn't work with the Excel add in. Maybe this works a little bit different.

  • Battery Boy Profile Picture
    Battery Boy 445 on at
    RE: AX 2012 - AIF - File System Adapter - Sales Order Import - Invalid Child Element

    Andy, where is 'customize documents'. I can't see this on the inbound ports form.

    Am trying to import list of pallets (WMSPallet table) via the excel add-in and get 'invalid child element' error.

    At this rate will be quicker to type them in

    If the schema of each table could be viewed would be very helpful.

  • Suggested answer
    andy007 Profile Picture
    andy007 380 on at
    RE: AX 2012 - AIF - File System Adapter - Sales Order Import - Invalid Child Element

    Please go to "System administration / Setup / Services and Application Integration ... / Inbound ports"

    - Select your sales order inbound port and deactivate it.

    - Check "Customize documents" (if unchecked) and open "Data policies"

    - Compare all enabled and required fields with your XML.

    - The XML has to contain all required fields (required = mandatory).

    - The XML can contain the enabled fields (optional)

    - Some fields lead to errors or don't make sense if enabled (don't recall extactly which, but I think e.g. _DocumentHash, SenderId, RecVersion, RecId, ...)

    - When finished close the window and "Activate" the port.

    In the same window you can take a look at "View schema".

    That's what I did when I got the "Invalid document schema" error.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans