web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by 1,347

 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
    380 on at

    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.

  • Battery Boy Profile Picture
    445 on at

    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
    380 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
nmaenpaa Profile Picture

nmaenpaa 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans