D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

D365 FO Technical - Creation of Purchase order from Purchase Requisition through code/ X++

  • 1.  D365 FO Technical - Creation of Purchase order from Purchase Requisition through code/ X++

    Posted May 18, 2021 04:18 AM

    Hello Everyone,

    There is situation that I have to create PO based on some parameter from Purchase Requisition through code in D365 fo PU 37.

    I was not using standard auto PO process from front end because I need to run this process conditionally and update some custom fields as well.
    I found code on google to create PO from PR but that code is directly inserting values to PO tables.

    My thinking is that there are already code is available to create PO from PR in standard, I want to use the same classes and method.

    If anyone can help me with class and method name where I can pass my purchReqID to create PO and later I'll update custom fields.

    Thanks for the help in advance.



    ------------------------------
    Anant Dubey
    Alfazance Consulting
    dubai
    ------------------------------


  • 2.  RE: D365 FO Technical - Creation of Purchase order from Purchase Requisition through code/ X++

    Posted Jun 25, 2021 01:48 AM
    Anant,

    Struggling here a little because isn't this out of the box functionality with F&O?

    Isn't the data behind a purchase requisition that has been approved but not released showing there is no associated Purchase Order in the joined table? IIRC, when you release an approved purchase requisition, isn't this when the Purchase order is created and copied into that joined purchase requisition table in the PurchID field?

    I would think you want to extend the PR approved but not released functionality and include the update to your custom fields?

    Sorry if this is incorrect..

    ------------------------------
    Bob Coward
    Dynamics AX/F&O Developer
    DSG
    Grayson GA
    ------------------------------



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