Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

How do I associate a new SalesOrder to a SalesAgreement?

$
0
0

I'm developing an application which is integrated with Dynamics AX 2012 using the AIF. We use the Document Services to read, create and update SalesOrder in AX. Now I have a problem when I want to create a new SalesOrder connected to an existing SalesAgreement (I think this is called a Release Sales Order). What fields in the SalesOrder.xml document must I set to associate the new order with an existing Sales Agreement? And also the SalesLine to the matching Agreement line. Below is a sample of a SalesOrder I send now:

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="schemas.microsoft.com/.../Message">
  <Header>
    <MessageId>{6AB0C52D-3F3D-4133-A242-879C782B7103}</MessageId>
    <Action>schemas.microsoft.com/.../create&lt;/Action>
  </Header>
  <Body>
    <MessageParts xmlns="schemas.microsoft.com/.../Message">
      <SalesOrder xmlns="schemas.microsoft.com/.../SalesOrder">
        <SalesTable class="entity">
          <ContactPersonId>033682_002</ContactPersonId>
          <CustAccount>P105622</CustAccount>
          <DlvMode>Hämtas</DlvMode>
          <DocumentStatus>None</DocumentStatus>
          <PurchOrderFormNum>PW_DUMMY</PurchOrderFormNum>
          <ReceiptDateRequested>2017-06-30</ReceiptDateRequested>
          <ShipCarrierDeliveryContact>nn 123</ShipCarrierDeliveryContact>
          <ShippingDateConfirmed>2017-06-28</ShippingDateConfirmed>
          <ShippingDateRequested>2017-06-30</ShippingDateRequested>
          <Agreement>5637156633</Agreement>
          <SalesLine class="entity">
            <DlvMode>Hämtas</DlvMode>
            <ItemId>71840A</ItemId>
            <SalesPrice>2.52</SalesPrice>
            <SalesQty>1000</SalesQty>
            <SalesUnit>st</SalesUnit>
            <ShippingDateConfirmed>2017-06-28</ShippingDateConfirmed>
            <ShippingDateRequested>2017-06-30</ShippingDateRequested>
            <InventDim class="entity">
              <InventColorId>Saleby G</InventColorId>
              <InventLocationId>Stakheden</InventLocationId>
              <InventSizeId>O</InventSizeId>
            </InventDim>
          </SalesLine>
        </SalesTable>
      </SalesOrder>
    </MessageParts>
  </Body>
</Envelope>

Best regards

/Valle


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>