Text Scroll

You must welcome, Thank you for visiting my blog.

Search This Blog

Tuesday, November 21, 2023

Open a Custom Power Page on Button Click in Model - Driven app (Dynamics 365)

Check below link for custom page creation: 

     https://mscrmtraining1.blogspot.com/2023/11/open-custom-power-page-on-sitemap-in.html

Custom Page:



JS Code :

if ("undefined" === typeof (Page)) {

    Page = { __namespace: true };

}

Page.Navigate = {

    navigateToCustomPage: function(){

    var pageInput = {

    pageType: "custom",

    name: "cr4a0_contactpage_963e5",

    };

    var navigationOptions = {

    target: 2,

    position: 1,

    width: {value: 70, unit:"%"},

    title: "Contact Details"

    };

    Xrm.Navigation.navigateTo(pageInput, navigationOptions)

    .then( function () {

            // Called when the dialog closes

        } ).catch( function (error) {

            // Handle error

        } );

} }

Create JS web resources using above code.


Add button in contact entity:

Open "https://make.powerapps.com/" and select edit command bar.


Add command button and add js library.

Call Javascript: Page.Navigate.navigateToCustomPage

Validate the Custom Page in Dynamics 365

Since we have created and configured the custom page in our sitemap, let us now validate the changes in Sales Hub,



No comments:

Post a Comment