Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

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

(1) ShareShare
ReportReport
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 74,036 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 74,036 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans