I m taking a CSV file and converting it to an XML that can then be imported via the sales order inbound port. The port is set up with the SalesSalesorder read, create etc and the data policies are standard. The xml file I create and the example from the MS customer source showing what the XML should look like look the same to me but I am getting an error processing the XML around the Salesline tag. I have stared at this for ages and cannot see where I have stuffed up. A fresh set of eyes may see it.
The error detail in the AIF processing exceptions is:-
The file I have created looks like :-
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="schemas.microsoft.com/.../Message">
<Header>
<MessageId>{86A4C9FA-EDCA-4532-88CF-DE2A47F9901C}</MessageId>
<Company>PTNZ</Company>
<Action>schemas.microsoft.com/.../create</Action>
</Header>
<Body>
<MessageParts xmlns="schemas.microsoft.com/.../Message">
<SalesOrder xmlns="schemas.microsoft.com/.../SalesOrder">
<DocPurpose>Original</DocPurpose>
<SalesTable class="entity">
<CurrencyCode>NZD</CurrencyCode>
<CustAccount>FLY001</CustAccount>
<DeliveryDate>2015-10-19</DeliveryDate>
<DeliveryName>Mrs Mary-Ellen </DeliveryName>
<InvoiceAccount>FLY001</InvoiceAccount>
<Payment>20TH</Payment>
<PurchOrderFormNum>PTED00000410233</PurchOrderFormNum>
<SalesLine class="entity">
<ItemId>Poppy</ItemId>
<QtyOrdered>1.00</QtyOrdered>
<SalesQty>1.00</SalesQty>
<SalesUnit>EA</SalesUnit>
<InventDim class="entity">
<configId>V1</configId>
<InventColorId>8</InventColorId>
<InventLocationId>NZ</InventLocationId>
<InventSiteId>NZ</InventSiteId>
<InventSizeId />
</InventDim>
</SalesLine>
</SalesTable>
</SalesOrder>
</MessageParts>
</Body>
</Envelope>
The MS example is found at
https://msdn.microsoft.com/EN-US/library/aa633136.aspx and looks like
<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns = "http://schemas.microsoft.com/
dynamics/2011/01/documents/Message">
<Header>
<MessageId>{D1F93462-0229-1430
-0001-93FAE32B2E4D}</MessageId>
<Action>http://schemas.microsoft.com/
dynamics/2008/01/services/
SalesOrderService/create</Action>
</Header>
<Body>
<MessageParts xmlns = "http://schemas.microsoft.com/
dynamics/2011/01/documents/Message">
<SalesOrder xmlns = "http://schemas.microsoft.com/
dynamics/2008/01/documents/SalesOrder">
<DocPurpose>Original</DocPurpose>
<SalesTable class = "entity">
<CurrencyCode>EUR</CurrencyCode>
<CustAccount>4000</CustAccount>
<DeliveryDate>2008-02-29</DeliveryDate>
<ExportReason>Sale parts.</ExportReason>
<Payment>D30</Payment>
<PurchOrderFormNum>PO2</PurchOrderFormNum>
<SalesLine class = "entity">
<ItemId>ESB-009</ItemId>
<SalesQty>1.00</SalesQty>
<SalesUnit>Pcs</SalesUnit>
</SalesLine>
</SalesTable>
</SalesOrder>
</MessageParts>
</Body>
</Envelope>
Many thanks
Paulina
*This post is locked for comments
I have the same question (0)