Announcements
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?
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.
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
3.Choose and find your existing custom page, you can un-tick Show in Navigation
4.Publish app
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.
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?
Hello,
Doublecheck that your custom page is added to the app you're trying to launch it from.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156