Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Power automate to copy lines from Sales order to Purchase order?

Posted on by 2
Hello, I want to have a button to copy lines from a sales order to a pruchase order - items and qty.
I'm a complete noob on power automate, and tried this:
 
I think this is the wrong way, as here I'm trying to create a new PO based on the order - and it goes bad because there's nowhere to get the vendor ID from.
 
Does anyone have any tips on how to do this? I'm OK with creating the PO on the vendor first, and then populating lines from a sales order, as long as I can pick it?
  • Tom_ikapa Profile Picture
    Tom_ikapa 52 on at
    Power automate to copy lines from Sales order to Purchase order?
    hi.
     
    I am curious as to why you want to do this via Power Automate when there is built in functionality within Business Central on the sales order page?
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,639 Super User 2024 Season 2 on at
    Power automate to copy lines from Sales order to Purchase order?
    Hi, I did a simple test today and hope it can give you some tips.
    Dynamics 365 Business Central: How to create Purchase Order from Sales Order with Power Automate (Copy lines from SO to PO)
     
    Thanks
    ZHU
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,639 Super User 2024 Season 2 on at
    Power automate to copy lines from Sales order to Purchase order?
    I think this may require a custom API if the vendor is not fixed each time, since as you mentioned, there is no Vendor ID in the standard SalesOrder API.
    PS: Can we extend standard APIs?: https://yzhums.com/20960/
    In addition, since the Sales Order Line may be more than one line, you need to add an Apply to each step.
    This is an interesting topic, I will test it in detail when I have time.
     
    Hope this can give you some hints.
    Thanks
    ZHU

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans