web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

Use Power Automate to create a Purchase Order, linked to a Purchase Agreement

(3) ShareShare
ReportReport
Posted on by 55
I am experimenting with using Power Automate to create Purchase Orders in D365 FO. I have been successful in getting it to create a Purchase Order Header record and then create Purchase Order Line records within the created PO by using the Create a record option on the PurchaseOrderHeadersV2 & PurchaseOrderLinesV2 entities. As part of both of these, I am designating a Purchase Agreement & Purchase Agreement line to link to. When the purchase order is generated, the Purchase Order Line does show it is attached to the correct PA & line. The problem is that when I navigate to that Purchase Agreement, it does not show any linkage to this new PO, and the quantity is not changed. 
 
So, it is creating the data correctly in the PO to appear to be linked to the PA, but that actual link does not seem to be occurring between the PO that Power Automate is creating, and the existing Purchase Agreement in the system. I am not sure if I am approaching this incorrectly/ missing a step, or if what I am doing is not possible through Power Automate.
 
Does anyone have experience with this, or can provide some guidance on what I am trying to accomplish?
I have the same question (0)
  • Adis Profile Picture
    6,048 Super User 2025 Season 2 on at
    Hi,
     
    It seems that there is a missing business logic from D365FO side when linking PA and PO through the entity. I am not sure if that is an issue on D365 side or on the entity. However, in both cases you would need a developer to investigate this. 
     
    You can only check if there is another entity in Power Automate to link PA and PO, if not then a developer may assist or another Community user who knows the answer straight away.
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,351 Super User 2025 Season 2 on at
    The issue is that while your Power Automate flow successfully assigns the Purchase Agreement (PA) and PA Line to the Purchase Order (PO), it does not trigger the system logic required to update the PA quantities and link the PO back to the PA.
    Solution:
    1. Use the "Confirm" Action on the PO
      • After creating the PO Header and Lines, use the "Update a record" action in Power Automate on the PurchaseOrderHeadersV2 entity.
      • Set the DocumentState field to "Confirmed" to trigger standard D365 logic.
    2. Ensure the PO is Released from the PA
      • When creating the PO, set the IsReleasedFromAgreement field to true on the PurchaseOrderHeadersV2 entity.
      • Ensure the PurchaseAgreementId and PurchaseAgreementLineId are correctly mapped.
    3. Trigger the Standard PA Update Process
      • If the above steps don't work, consider running the "Release order from purchase agreement" process via a custom Power Automate flow or a D365 batch job.
    Summary:
    Manually linking the PO to the PA without triggering D365’s standard release logic prevents the PA from recognizing the PO. Ensuring the PO is confirmed and properly marked as released from the PA should resolve the issue.
  • Verified answer
    Jonas "Jones" Melgaard Profile Picture
    4,926 Most Valuable Professional on at
    Don't mind the AI answer; It looks like a result of GPT hallucination. 
     
    As Adis said, there is no possibility to create release orders without doing customizations. The logic is not exposed as an API.
     
    Looking at the release order creation code, it's a fairly easy customization to make, so I would not be too concerned about it.
     
    On as side note, there is the new "contract lifecycle management" integration. I'm not sure it will solve your need, but regardless it's an interesting read: https://learn.microsoft.com/en-us/dynamics365/supply-chain/procurement/contract-lifecycle-management/clm-overview
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 266 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans