5 ways to run a flow on multiple records inside a model-driven app

Sdílet
Vložit
  • čas přidán 2. 07. 2024
  • Join me as I break down 5 of the most common ways of running Power Automate Cloud Flows on multiple selected records from inside a model-driven grid.
    Links from the video:
    👉My free course on writing JavaScript web resources for model-driven apps - learn.develop1.net/courses/bu...
    👉Configuring the Creator Kit DetailsList • Dataverse Grid Control...
    👉 TypeScript code www.develop1.net/public/post/...
    👉Open custom page from JavaScript learn.microsoft.com/en-us/pow...
    👉 How to work around the 2-minute timeout when calling flows from Power Apps (learn.microsoft.com/en-us/pow...)
    #PowerApps #msdyn365 #powerplatform #powerautomate
    00:00 Introduction
    01:07 #1 - Legacy Flow Button
    03:53 #2 - Bulk Edit
    08:16 #3 - Power Fx Modern Command Grid Button
    12:59 #4 - JavaScript Modern Command Grid Button
    19:20 #5 - Custom Page to run a single flow for multiple records
    32:06 Summary
  • Jak na to + styl

Komentáře • 53

  • @TDevolder
    @TDevolder Před rokem +5

    Thx Scott! This is really premium content!
    A variation to call a PA flow from a Modern Command Bar button is to call an instant PA flow that is triggered with an HTTP Request. It allows the javascript to asynchronously call the PA flow, wait for the result and launch a callback.
    But next tile around, I'll write it in Typescript... already started your course 😉

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Hi Tom! Thank you so much for watching ☺️ Absolutely- the HTTP trigger is another technique too - the RibbonWorkbench WebHook smart button can be used to do that for those who don’t want to write the JS - you might also find the TypeScript code from smart buttons useful github.com/scottdurow/RibbonWorkbench/blob/master/SmartButtonsUCI/SmartButtons.ClientHooks/src/RunWebHook.ts
      Here’s is a video on how to do it using Smart Buttons czcams.com/video/QaIdbs4W9n0/video.html
      Thanks again! ☺️

  •  Před rokem

    Very comprehensive showcase of the different options! I personally loved the Custom Page demonstration

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Thank you! I love the power that custom pages brings too!

  • @bernardnguyen5382
    @bernardnguyen5382 Před rokem

    Thanks a lot Scott, your content is very interesting and really technical. You're really too impressive ahah and personally, sharing your knowledge really helps me to improve my skills. The 5 ways you show in your video prove that thinking is varied depending on the needs of the projects. Man, you do it with such ease, it's admirable! Keep on with your videos I'kiff ahah!
    Thanks again!

  • @DataSpinners
    @DataSpinners Před rokem

    thx Scott, looks like we may need to learn a bit of JavaScript along the way

  • @philglew-deval
    @philglew-deval Před rokem

    This is superb. Well done!!!

  • @DanielADamico
    @DanielADamico Před rokem

    Awesome video! Thanks for sharing this!🙂🙂

    • @ScottDurow
      @ScottDurow  Před rokem

      Thank you Daniel and thank you for watching ☺️ Have you used any of these techniques - or a different one?

  • @ScottJacksonUK
    @ScottJacksonUK Před rokem

    Thanks Scott for making another great video, we have been putting custom buttons in forms as web resources so that they are right in front of the users to reduce the training needs. I really like your different takes on this and the showing progress by using a timer job with a Rand() filter is one tip that I've put in my backpocket to use in the future.

    • @ScottDurow
      @ScottDurow  Před rokem

      Thank you Scott! - great to hear from you. I really like that technique. It would be fantastic if we could replace the HTML webresources on forms with custom pages. Please vote up this idea (and tell your friends!!)! powerusers.microsoft.com/t5/Power-Apps-Ideas/Allow-embedding-of-custom-pages-inside-model-driven-app-forms/idi-p/1817431

  • @jjcooney9758
    @jjcooney9758 Před rokem +1

    Always quality content! 😊

    • @ScottDurow
      @ScottDurow  Před rokem

      Thank you ☺️ Would you buy merch though 🤣

  • @oreganmike
    @oreganmike Před rokem

    I rarely find conent worthy of subscribing to, but as previously mentioned: it's definitly premium, so thanks! +liked +subscribed 👍

    • @ScottDurow
      @ScottDurow  Před rokem

      Thank you Mike - that means so much and really encourages me to keep at it! ☺️

  • @user-ox7zt9oq6x
    @user-ox7zt9oq6x Před rokem

    Thank you very much for sharing very useful content !!!

    • @ScottDurow
      @ScottDurow  Před rokem

      Glad it was helpful! Thank you for watching ☺️

  • @prajwalskateel
    @prajwalskateel Před rokem

    This video was really helpful, thank you so much

    • @ScottDurow
      @ScottDurow  Před rokem

      Thank you Prajwal ☺️ - which part did you find the most helpful?

    • @prajwalskateel
      @prajwalskateel Před rokem

      @@ScottDurow command button using js ,,i feel this use case can be used for multiple other req.

  • @gznqtl
    @gznqtl Před 5 měsíci

    Hello Scott, this is a great video, from the very basic to advanced. You show me so many options to execute this bulk changes. I am not familiar with Web Developer I will check Java Script Tutorial . Do you have any recommendation for JSON use it in model driven apps?
    Greeting froms Mexico

  • @tristangeoffroy9286
    @tristangeoffroy9286 Před rokem

    Hello, yes fantastic content I was looking for. Especially the progress of flow running on the back. I’m going to implement it shortly. Thank you very much. Wouldn’t you add a sixth, that would be from the business process flow…without the too long stepping : execute/run the flow/done.

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Hi Tristan - thank you so much for watching and I am glad you found it useful. ☺️ Running a flow from a BPF is a great feature - albeit a for a single record.

  • @rashimalhotra8642
    @rashimalhotra8642 Před rokem +1

    Hi Scott, that's a really nice video explaining every single step and ways to run the flow from model driven app. Loved it! Thanks 😊.
    I have a question. Can we run the flow sequentially? I do not want to mess up the "line numbers" column that we have in the subgrid. So wanted to run the flow sequentially when multiple records are selected.

    • @bonnyboy23
      @bonnyboy23 Před rokem

      if you use the PowerFX (method 3) you can do the forAll and then do the patch within the forall to make it sequential but make sure that the allitems is ordered in the way you need them to be ordered, which in turns should cause the flows to run in order, however there isnt a way to force flow to run sequentially in terms of if one of the runs is delayed, the modified on may not be exactly in order.

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Hi Raaij/Benjy! Thank you so much for watching! As Benjy says, you can run the flows sequentially using method 3, but that still might end up with the flows overlapping. To truly have them sequential you would need to wait until one has completed before starting the next. That could be done using method 4 or 5. In 4, the JavaScript would wait before starting the next instead of using a batch, and in method 5 you can order the collection you send to the flow and use the concurrency control on the Apply to each to set the degrees of parallelism to just 1.

  • @mvernet30
    @mvernet30 Před rokem

    Hello there, thanks for sharing all your work!, it's really helpfull!!!, I liked de power fx way, but it's there a way to show on screen that the process is running and then when its finished and refresh subgrid??

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Hi Matias - thank you and thanks for watching! ☺️Currently there is no way of displaying a wait spinner using Power Fx directly from a command button - you would need to show the custom page to do that at this time (or use JavaScript!)

  • @BartolomeoSorrentino
    @BartolomeoSorrentino Před rokem

    Thanks Scott as usual you share valuable content
    I know a sixth method to achieve this that is use a Dataverse Custom Api.
    You can trigger a flow from a Dataverse Custom Api and use javascript to call such Api.
    Probably in some cases have an Api catalog could be useful

    • @ScottDurow
      @ScottDurow  Před rokem

      Great tip! Thank you for watching and your support!

  • @joaomacaumaia3834
    @joaomacaumaia3834 Před 8 měsíci

    Thanks! one question! does the update action trigger the flow and enter in a infitite loop?

  • @ResponsibleXI
    @ResponsibleXI Před 5 měsíci

    @ScottDurow Is it possible to pass the selected view and filtered view as an argument or parameter to the flow?

  • @ranatahirtahir9980
    @ranatahirtahir9980 Před rokem

    Nice 👍

  • @dudunek
    @dudunek Před rokem

    Our approach is ribbon button to trigger http cloud flow passing array of selected items. The flow endpoint is kept in environment variable. JS read the endpoint and sent a http request to it putting the process indicator on the screen while waiting for response. The real life issue that we are facing is that the users can actually trigger that Javascript multiple times regardless the process indicator refreshing the page.

    • @ScottDurow
      @ScottDurow  Před rokem

      Thank you for watching and sharing that. Perhaps you could put a check in the flow to see if the operation has already be carried out - you might also hide the button based on a value that is updated before the flow is run. Again - thank you for sharing 👍

  • @ouihui
    @ouihui Před 18 hodinami

    Hi Scott,
    I get this error when trying to build out the automation connected to the status of a record selected: "Data events are not enabled for this virtual table. VirtualEntityMetadata configuration is missing."
    Do you know how I can solve this? Thanks!

  • @MuhammadHaris-ee4ms
    @MuhammadHaris-ee4ms Před měsícem

    Hey Scott,
    I hope you are doing well,
    Can you please tell me how you add the save button in the edit form?
    time:7:44

  • @unetseulement
    @unetseulement Před rokem

    can the view be added to a Portal page and still have these functions, instead of from MDA?

  • @magnusjeppesen
    @magnusjeppesen Před 10 měsíci

    Really awesome :)
    However when trying to do this on the Main Grid (instead of Main Form), I cannot pass the parameters to the CustomPage.
    The parameters are available in the javascript, but nothing is passed to the custom page. There's no issue when I make almost the same setup in a Main Form, but when doing it on a Main Grid, the parameters are lost somewhere between the javascript and the custom page.
    I even tried to make a static variable in the javascripts, which wasn't passed into the custom page.
    Also tried making a static string parameter on the Main Grid Command Button configuration, which also wasn't passed into the custom page.
    Any ideas?

  • @sxlalan
    @sxlalan Před rokem

    Some great info here, thanks Scott. I've run in to one issue trying to replicate the Power Fx button / patch command scenario. When I use a custom table, everything works as expected. If I use the standard Contacts table though I only seem to be able to use the standard columns in the patch command. If I add a custom "Report Generation Status" column and then try to reference that in the Patch command, I get an error saying "Invalid argument type (Table). Expecting a Record value instead.". My custom columns also don't appear in the intellisense. I don't get this error if I choose a standard column to update (instead of a custom one) or if I use a similarly named custom column in a custom entity. I have checked and rechecked the column name I am trying to use. What am I missing here?

    • @ScottDurow
      @ScottDurow  Před rokem

      Interesting- I have not seen that behaviour - what if you open the component library and refresh the Account connection?

  • @maksimdmitrenko
    @maksimdmitrenko Před rokem

    Hi! Is it possible to call Instant flow with JS? I need to clone record and Open its Main Form.

  • @Pokke91
    @Pokke91 Před měsícem

    The Power Fx Modern Command Grid Button is not working for me. When i try to Patch a Date Column with your code nothing happens. Or it creats new items but not update the old ones. Maybe you have on answer. Thanks a lot!

  • @theoquasi
    @theoquasi Před 11 měsíci

    It’s hilarious that MS does not provide a simple and clean possibility for that. Marking the easiest und cleanest way #1 as deprecated but not offering a replacement in the officially recommended connector instead.

  • @BuLiGuT
    @BuLiGuT Před 5 měsíci

    Is it wrong to use the legacy button option?

  • @sarahbennett7571
    @sarahbennett7571 Před rokem +1

    I use the legacy trigger with flows inside a solution, so I'm confused by your statement that you can't. I have many flows that live inside a solution that use the legacy trigger.

    • @sarahbennett7571
      @sarahbennett7571 Před rokem +1

      Perhaps you're only referring to when the creation of the flow is triggered from the Flow button, whereas I have created a flow from within a solution.

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Hi Sarah, yes, thank you for pointing that out, and thank you for watching.
      You can create a flow inside a solution using the Legacy 'When a flow is selected trigger', but if it is created from the flow button as I show, you can't then add it to a solution (learn.microsoft.com/en-gb/power-apps/maker/data-platform/solutions-overview#known-limitations ). I definitely should have made that clearer!

  • @saurabhtalele1537
    @saurabhtalele1537 Před rokem

    cool video.... can i add second screen on custom page???

    • @ScottDurow
      @ScottDurow  Před rokem +1

      Hi Saurabh - thank you for watching ☺️ - yes you can - you just have to enable multiple screens in the settings!