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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

trigger a Dynamics web resource with Powerflow

(0) ShareShare
ReportReport
Posted on by

Hi !

I want to trigger a javascript web resource at the end of a flow and I wonder if it's possible.

I find the opposite but not in this way.

Thanks for your help !

Alex

I have the same question (0)
  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    Power Apps Flow runs asynchronously (in the background) and they are not aware of UI.

    In other words, this is not possible.

  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    Can you please give more details about your scenario ?

    I managed once to open a progress bar while the flow is running. At the end of the flow execution, I close the progress bar and refresh the values on my form. For this, I have a technical field that determines the state of the flow. Then on the client side, I check the state of the flow via the technical field periodically.

  • Community Member Profile Picture
    on at

    Hi @Medhi El Amri,

    Thanks for your response.

    I used a javascript grid to create my quotes because my client have a 4 levels products like this example :

    Final Product

          Part 1 of final product =>Composed Product

                Part 1 of composed Product =>intermediary product

                         Product 1

                         Product 2

          Part 2 of final product ...

    He can add a line at any level and when he add a line, a flow start to add the sub-lines regarding the line he add.

    Flow execution is not always the same because I can have 3 to 15 lines to create and instead of put a timer in my javascript to refresh the view, I want to launch a refresh at the end of my flow.

    So I look for a solution to tell my javascript that it can start and it's seems that it's more or less what you put in place.

    Thank for your help.

    Alex

  • Verified answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi Alexandre,

    Yes, you can follow the same logic I outlined in my first post. Indeed, you will need to create a technical field of type option set with 4 values which will correspond to the state of the execution of your flow.

    1- Not Started

    2- Running

    3- Success

    4- Failure

    On your flow, you will have to update the technical field at the beginning and at the end of the flow.

    On your JS you will check the state of the flow periodically. For example, you will do a retrieve every 0.5 seconds on the technical field. In effect, it's like pinging the technical field to check the state of your flow.

    If this is not clear, I will try to write a blog that will explain this approach.

  • Community Member Profile Picture
    on at

    Hi !

    It's perfectly clear and I feel so stupid not to think about this solution myself !!

    Tanks again !

    Alex

  • AriaConsulting Profile Picture
    2 on at

    Alternatively, you might suggest to your client that they take this out of the context of D365 Sales and consider deal with it in an ERP that offers, at least, basic BoM (Bill of Materials) capabilities, as that is exactly what you described.  D365 Business Central can do this.  Typically, BoM is associated with manufacturing, but there are many cases out there of companies that don't truly 'manufacture' something; rather they do 'kit assembly'.  But the software capabilities are the same at that level, its just that the levels below that such as routings and engineering control and so on aren't required.  The "final product" in your description is what is made available to D365 Sales to sell.  The huge advantage of this is that they get all the costing, including WIP (Work in Progress), and the associated financial system postings as part of the deal.  Which they will NOT get through your custom approach in D365 Sales.

    There are, of course, less costly alternatives to Business Central.  MANY.  But what you're describing really does belong in the ERP realm not the 'CRM' realm.  And doing it properly in an ERP system that provides BoM capability doesn't rob you of revenue as they will still need some custom dev work done to integrate a non-Dynamics ERP to D365 Sales.

    Oh, and this is the first time I've heard anyone call it "Powerflow", LOL!

  • Community Member Profile Picture
    on at

    Hi @Mehdi El Amri !

    I run test with this method but my page froze and I have an "out of memory". I think it's due to the while () loop running but even with delay I've got the same issue.

    How did you bypass this problem ?

    Thank you again for your support.

    Alex

  • AriaConsulting Profile Picture
    2 on at

    Of course, you could ignore my reply and forge ahead trying to accomplish something the technology wasn't designed to support.

    Good luck!

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

Season of Giving Solutions is Here!

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 > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans