Skip to Content
0

$batch unable to retrieve header and line item in the CHANGESET BEGIN Method

May 24, 2017 at 09:55 AM

40

avatar image

Hello,

I am trying to pass Header and Line Item in the payload as 2 independent entities.

I could find the header in the changeset_begin "it_operation_info " method but I am not able to find the line item. It show only one entity type ie the header.

This is the payload I am sending , Request you to help me on this

–batch
Content-Type: multipart/mixed; boundary=changeset_01869434-0005-0001

–changeset_01869434-0005-0001
Content-Type: application/http
Content-Transfer-Encoding: binary

POST SalesOrders HTTP/1.1
Content-Type: application/atom+xml
Content-Length: 1021

<?xml version=”1.0″ encoding=”UTF-8″?>
http://www.w3.org/2005/Atom” xmlns:m=” http://schemas.microsoft.com/ado/2007/08/dataservices/metadata” xmlns:d=” http://schemas.microsoft.com/ado/2007/08/dataservices”>
<content type=”application/xml”>
<m:properties>
<d:Singleshipmentindicator>X</d:Singleshipmentindicator>
<d:Salesordersimulation>false</d:Salesordersimulation>
<d:Salesordernumber>0</d:Salesordernumber>
<d:Po/><d:Requesteddate>20170523</d:Requesteddate>
<d:Customerid>3272</d:Customerid>
<d:Salesorganization>3020</d:Salesorganization>
<d:Distributionchannel>30</d:Distributionchannel>
<d:Division>00</d:Division>
<d:Shipmentinstruction/>
<d:Notestoreceiver/>
<d:Shiptopartnerid>0000003272</d:Shiptopartnerid>
</m:properties>

</content>
</entry>

–changeset_01869434-0005-0001
Content-Type: application/http
Content-Transfer-Encoding: binary

POST OrderItems HTTP/1.1
Content-Type: application/atom+xml
Content-Length: 1021

<?xml version=”1.0″ encoding=”UTF-8″?>
http://www.w3.org/2005/Atom” xmlns:m=” http://schemas.microsoft.com/ado/2007/08/dataservices/metadata” xmlns:d=” http://schemas.microsoft.com/ado/2007/08/dataservices”>
<content type=”application/xml”>
<m:properties>
<d:Quantity>1</d:Quantity>
<d:UnitofMeasure>PC</d:UnitofMeasure>
<d:RequestedDeliveryDate>20170523</d:RequestedDeliveryDate>
<d:Product>358</d:Product>
<d:SalesOrderNumber/>
<d:ItemNumber>000010</d:ItemNumber>
<d:Currency>USD</d:Currency>
</m:properties>

</content>
</entry>

–changeset_01869434-0005-0001–

–batch–

Thanks,

Deepak.M

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Richard Martens May 24, 2017 at 10:07 AM
0

Hello Deepak,

your Xml is invalid. Entry tags are closed, but not opened and the line after "<?xml version=”1.0″ encoding=”UTF-8″?>" dont begin with "<".

Regards,

Richard

Share
10 |10000 characters needed characters left characters exceeded