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 :
Power Platform Community / Forums / Power Apps / Embedded Canvas Apps C...
Power Apps
Unanswered

Embedded Canvas Apps Calling Custom Page Modal Dialogs

(0) ShareShare
ReportReport
Posted on by 123

Hi everyone,

This is related to Dynamics as well as Power Apps, so hopefully it's the right place. 

 

We recently had a requirement to open a custom page as a modal dialog, from a canvas app embedded on a model-driven app form. 

 

I had a good search around but couldn't find any way of doing it directly within the Canvas App using PowerFX. I also couldn't find a way to run Javascript from within the app, utilising the Client API navigateTo.

 

In the end I've created a button on my embedded canvas app form, which patches a yes/no choice field on the main form (hidden from users). I then register a Javascript function to open my dialog for the onChange of that field.

 

It works, but feels clunky as anything. Has anyone had a similar requirement and a different way of doing things (or any ideas)?

 

Kind regards,

Matt Taylor

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Hi @MattTaylor ,

     

    I do not know if it is possible to launch a custom model dialog directly from an embedded canvas app (do not see what the use case would be!), but you can certainly launch one using the Command Ribbon and JavaScript.

     

    There are a number of steps involved which would probably out of the scope of a forum post. Fortunately there are also many guides online. Below are two useful ones:

     

    https://www.matthewdevaney.com/power-apps-custom-page-modal-dialog-for-model-driven-apps/ 

     

    https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/navigate-to-custom-page-examples 

     

    Recent post from me supporting someone else who got stuck in case you have similar issues:

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-pass-GUID-to-custom-page-from-Model-driven-app-Main-form/m-p/2112636#M527903 

     

    If you get stuck or have any questions, feel free to @ me.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • MattTaylor Profile Picture
    123 on at

    Hi @Amik,

     

    Thanks for the response. I'm quite familiar with using the modal dialogs from the ribbon - pretty sure I used Matthew Devaney's post to learn it too; love his stuff.

     

    I'm sure there are plenty of use-cases, why wouldn't there be 😄 Dialogs are useful for a number of things, but in our particular case I want to carefully control input on a couple of fields and then display a call dialog on demand based on what those fields are. Could I do it using a ribbon command? Sure, but the user experience in this case is much better when everything is inline. 


    Kind regards,

    Matt

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Apologies @MattTaylor when you said you couldn't find a way to run JavaScript from within the app I misunderstood you.

     

    I would also try the https://community.dynamics.com/ forum as well if you have not already. All of my Dynamics stuff tends to get answered (eventually) over there.

  • MattTaylor Profile Picture
    123 on at

    The legendary Scott Durow made this video a while ago: https://www.youtube.com/watch?v=uC4XBktbHjg, showing how you can run Javascript within a Canvas App. I think that modal custom pages are a really useful feature, so it would be nice to see a way to call them from within an embedded Canvas App. It's easy enough to make your own modal dialog within a Canvas App, but I'm trying to combine the Model-Driven features, with the embedded Canvas App, and the Custom Page as well. 

    Appreciate you taking the time to respond though! 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard