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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to launch Custom Page modal dialog from an editable subgrid

(0) ShareShare
ReportReport
Posted on by 103

I'm trying to open a modal dialog from an editable subgrid.  The function is successful, yet the dialog is not launched.  The following is the code:

function OpenModal(executionContext) {
    debugger;
     
    // Inline Page
var pageInput = {
    pageType: "custom",
    name: "PolicyCommissionModal"
};
var navigationOptions = {
    target: 2,
    position:1,
    width: {value:50, unit:"%"},
    title: "Policy Commission Form"
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
    .then(
        function success() {
            console.log("success");
        }
    ).catch(
        function (error) {
            console.error(error);
        }
    );
}

Can we open Custom Pages as a modal from a subgrid?

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: How to launch Custom Page modal dialog from an editable subgrid

    Hello,

    Doublecheck that your custom page is added to the app you're trying to launch it from.

  • MZ_980 Profile Picture
    103 on at
    RE: How to launch Custom Page modal dialog from an editable subgrid

    I'm not sure what you are referencing.  It's a page within the same solution that my form is in.  Is there another thing I need to do to launch the custom page?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: How to launch Custom Page modal dialog from an editable subgrid

    Solution and app (model-driven app) are different things. In order to make your code work the way you want you to have to add your custom page to the model-driven app you want to call it in.

  • Abby Kong Profile Picture
    6 on at
    RE: How to launch Custom Page modal dialog from an editable subgrid

    Went through similar issue with you recently :) as Andrew described, we need to include the custom page in the Model-Driven App for the custom page popup to show.

    1. From your solution, find the MDA and edit it (The type of the solution component should be Model-Driven App)

    2. Add Page 

    pastedimage1673402462031v1.png

    3.Choose and find your existing custom page, you can un-tick Show in Navigation

    4.Publish app

  • Verified answer
    MZ_980 Profile Picture
    103 on at
    RE: How to launch Custom Page modal dialog from an editable subgrid

    To reference the answers posted, I did add the custom page to my app.  That was why I was asking what was being referred to meaning if there was another step that I missed after adding the custom page to my app.

    The problem was that I was using the display name instead of the name of the custom page in my code above.  Once I made the change, I was able to launch the modal.  

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

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 101

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans