D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

DMF - D365 F & O

  • 1.  DMF - D365 F & O

    Posted Sep 13, 2019 05:04 PM
    I want to import the purchase order header and lines information into D365FO system for Insert/Update and am aware that there is a standard composite entity which does that, but with limitation of only XML file types. I want to import data from Excel files.
    I tried to create a custom data entity with the PurchTable and PurchLine tables. As usual, the export works smoothly but the import doesn't for obvious reasons. The system validates the purchId from PurchLine table and will not find a match and throws an error.
    Can someone help me what methods I can use for following.
    For, new PO header and lines I want to insert data into the header first and then attempt to insert in the line.


    Srikanth Konda

    Academy - Online Interactive Learning from Experts

  • 2.  RE: DMF - D365 F & O

    Posted Sep 15, 2019 10:54 PM
    Edited by Chaitanya Golla Sep 15, 2019 10:55 PM

    You can implement the numbersequence code either in method initValue (or) post-event handler of method mapDataSourceToEntity of your custom entity. While importing the data specify the value for PurchId as 1,2(on header) and so on(also on the purchase order lines accordingly).

    Sample code:
                    this, fieldNum(customEntity, PurchId), PurchParameters::numRefPurchId());

    Chaitanya Golla
    Lead Architect

    Academy - Online Interactive Learning from Experts

  • 3.  RE: DMF - D365 F & O

    Posted Sep 25, 2019 05:16 PM
    Hi Srikanth,

    If you are bringing purchase orders from legacy system and If your file already includes 'purchId', then your can make your number sequence as 'manual'. you can do that from number sequence setup and entity will create purchase order with Id in file. If you planning to create your own purchId and want to populate it from header. you have to create composite entity, refer 'SalesOrderEntity' for the same.

    vishal Dhawgaye
    Hitachi Solutions America, Ltd.

    Academy - Online Interactive Learning from Experts

  • 4.  RE: DMF - D365 F & O

    Posted Sep 26, 2019 02:29 AM
    I am not sure this is what you want, but during the import you can go to the map for the header entity and change the purchaseordernumber to auto. This lets the import auto generate the PO number and I think it also align the lines to the new number.

    Glenn Linaa
    Tasklet Factory Mobile WMS
    aalborg, Denmark

    Academy - Online Interactive Learning from Experts

If you've found this thread useful, dive deeper into User Group community content by role