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 :
Dynamics 365 Community / Blogs / Power Melange / Generate “Invoice” and cha...

Generate “Invoice” and change Work Order Status to “Posted” via Power Automate when the Booking Status is Completed

PowerMelangeByShalinee Profile Picture PowerMelangeByShalinee 70

Business Scenario: When the Booking Status is Completed, first change the Work Order Status to “Posted” and then generate an Invoice via Power Automate. This should happen only in the case when the work order is generated from an Opportunity.

Solution: We are creating an automated cloud flow with the trigger as “When the Booking Status is modified for the Bookable Resource Bookings table”

Then we are checking if the Booking Status is “Completed”

If Yes, then we are changing the Work Order System Status to “Posted

I am terminating the flow if the Work Order is not generating from “Opportunity”

Then i am adding an Invoice record in “Invoices” table

Please note here the Price List field is referred to as: “pricelevels“.

Then we are listing all the “Work Order Products” related to that Work Order

Then we will apply to each work order product and get the Product Details

Then we will add it to “Invoice Products” with the given Invoice ID

Please note that the Units are referred as “uoms

Then we will list all “Work Order Services” related to the work order.

Get the Service Product details:

then add it to Invoice Products against the Invoice ID:

Let us now run the flow- The flow ran successfully:

Hope it helps!

& the Power Quote of the day is:

“The best way to predict your future is to create it” ~ Abraham Lincoln


This was originally posted here.

Comments

*This post is locked for comments