cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dennisb88
Responsive Resident
Responsive Resident

custom page does not open in model driven app

Hi all,

 

I've a custom page created (with schema name "vi_uploadhubblereport_ca3ef"). 

I add a custom command to the form to open the custom page with the record guid.

 

To do that, I've added the follow js code as web resource to my solution:

function openCustomPage(formContext)
{
var pageInput = {
    pageType: "custom",
    name: "vi_uploadhubblereport_ca3ef",
    recordId: formContext.data.entity.getId().replace(/[{}]/g, ""),
};
var navigationOptions = {
    target: 2, 
    position: 2,
    width: {value: 500, unit: "px"}
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
    .then(
        function () {
            // Called when page opens
        }
    ).catch(
        function (error) {
            // Handle error
        }
    )};

My settings for the commandbar:

dennisb88_0-1656508737002.png

 

When I press the new command control from my main form, there is nothing happens. The custom page will not be opened and also there is no error or something else happens.

 

Does anyone know what I doing wrong.

 

1 ACCEPTED SOLUTION

Accepted Solutions
a33ik
MVP

Hello,

I know what is wrong exactly - in order to make the page working in model driven app you have to add this page to that model driven app. Check this post - https://dianabirkelbach.wordpress.com/2021/07/29/how-to-make-dialogs-for-model-driven-apps-using-cus...

View solution in original post

2 REPLIES 2
a33ik
MVP

Hello,

I know what is wrong exactly - in order to make the page working in model driven app you have to add this page to that model driven app. Check this post - https://dianabirkelbach.wordpress.com/2021/07/29/how-to-make-dialogs-for-model-driven-apps-using-cus...

dennisb88
Responsive Resident
Responsive Resident

You're totally right! Thanks!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,931)