D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

DMF - D365 F & O

  • 1.  DMF - D365 F & O

    Posted 30 days ago
    Hello,
    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.

    Thanks
    Srikanth

    ------------------------------
    Srikanth Konda

    ------------------------------
    Conference-AXUG_200x200


  • 2.  RE: DMF - D365 F & O

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Edited by Chaitanya Golla 28 days ago
    Hi,

    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:
    NumberSeqRecordFieldHandler::enableNumberSequenceControlForField(
                    this, fieldNum(customEntity, PurchId), PurchParameters::numRefPurchId());


    ------------------------------
    Regards,
    Chaitanya Golla
    Lead Architect
    ------------------------------

    Conference-AXUG_200x200


  • 3.  RE: DMF - D365 F & O

    Posted 18 days ago
    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.
    ------------------------------

    Conference-AXUG_200x200


  • 4.  RE: DMF - D365 F & O

    SILVER CONTRIBUTOR
    Posted 18 days ago
    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
    ------------------------------

    Conference-AXUG_200x200


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