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
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.
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156