Translate

Sunday, July 1, 2018

Dynamics 365 Operations | Composite data entity – Sales order import (Only works with XML)

First thing first, learn basics of composite data entities using below URL:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/develop-composite-data-entities
1.     Data management work space > Import
2.     Create new import project > “Sales order import” provide other info like description, project type = Import.
3.     Create XML file like below:
xml version="1.0" encoding="utf-8"?>
<Document>
    <SalesOrderHeaderV2Entity>
        <SALESORDERNUMBER></SALESORDERNUMBER>
        <CURRENCYCODE>USD</CURRENCYCODE>
        <INVOICECUSTOMERACCOUNTNUMBER>DE-001</INVOICECUSTOMERACCOUNTNUMBER>
        <ORDERINGCUSTOMERACCOUNTNUMBER>DE-001</ORDERINGCUSTOMERACCOUNTNUMBER>
        <SalesOrderLineV2Entity>
            <ITEMNUMBER>D0001</ITEMNUMBER>
            <LINEAMOUNT>777.000000</LINEAMOUNT>
            <SALESPRICE>18.000000</SALESPRICE>
            <SALESPRICEQUANTITY>2.000000</SALESPRICEQUANTITY>
            <SHIPPINGSITEID>6</SHIPPINGSITEID>
        </SalesOrderLineV2Entity>
        <SalesOrderLineV2Entity>
            <ITEMNUMBER>D0003</ITEMNUMBER>
            <LINEAMOUNT>777.000000</LINEAMOUNT>
            <SALESPRICE>18.000000</SALESPRICE>
            <SALESPRICEQUANTITY>2.000000</SALESPRICEQUANTITY>
            <SHIPPINGSITEID>6</SHIPPINGSITEID>
        </SalesOrderLineV2Entity>
    </SalesOrderHeaderV2Entity>
</Document>
4.     In selected entities area, click add file.
5.     Entity name = Sales order composite v3, Source data format = XML-Attribute.
6.     Click upload and add > browse the above xml and say ok.
7.     Dialog appears to Generate mapping click Yes.
8.     Once entity is added to lines section, scroll to the right click View map and set below map.
Header:
-       Sales order number = mark as auto generated.
Lines:
-       Inventory lot it = mark as auto generated.
-       LineCreationSequenceNumber = mark as auto generated
9.     Once done Save the configuration and import file.

9 comments:

  1. Thanks for posting the useful information to my vision. This is excellent information.
    Microsoft Dynamics AX Online Training

    ReplyDelete
  2. An ideal free sales course begins with an introduction which lays the foundation for the main topics to be discussed later on, including; sales introduction, sales questions, presentation as well as closing sales. קורס מכירות

    ReplyDelete
  3. Note that there is an error in the XML printscreen, the variable for the quantity is not but should be . Note also that the data entity supports the creation of intercompany sales/purchase orders

    ReplyDelete
    Replies
    1. Sales quantity variable is ORDEREDSALESQUANTITY

      Delete
  4. I am unable to get the xml doc upload when I attempt adding it

    ReplyDelete
  5. Hello - I found this blog post as I am searching for information on using composite entities for D365 Sales Orders and Purchase Reqs. My question is, when I export the composite entity, I must export as XML format which is successful but how do I work with an XML file to populate with new information? Is there some type of a template or software needed to populate the entity with say 1000 records to be imported?

    ReplyDelete