Opening a custom page from the Power Fx command bar!
Power 365 Solutions Power 365 Solutions
880 subscribers
3,746 views
31

 Published On Aug 31, 2022

In Today’s Power Short, Tom Moore explains how to open a custom page from your model driven applications using the new Power Fx command bar designer.

This video helps you understand how you can use Power Fx with custom pages to leverage the data from within your model driven forms.

Not only does this hugely increase the potential of your day-to-day working apps but also means, that if you are licensed on the £3.80 per user per month license, there's no extra licensing requirement! 😱

#P365 #power365solutions #Microsoft #Dynamics365 #Office365 #Powerplatform #Sharepoint #Microsoftconsultancy #PowerShorts #TipsandTricks

Java Script:

function onLoad(e)

{}
//------ This is the function that you will call when you create the button, I name them accordingly. ------//
function PowerShortButton(e)

{
var formContext = e;
var thisId = formContext.data.entity.getId().replace("{", "").replace("}", "");
debugger;

// Centered Dialog

var pageInput = {

//------ This is how the button knows what you are trying to access. There is documentation on microsoft docs (google: xrm.navigation) on the pageType(s) that you can use, in this instance I am launching a custom page -----//
//------ The key information is the name, and table name. You want to give it the name seen in the solution, note: once this is set you can't change it ------//
//------ The entity name is the entity in which this item is referring to ------//
//------ The Record ID is taken from var formContext above, this is how you will link it to that individual record in the table. ------//


pageType: "custom",
name: "p365_contactpopup_77b43",
entityName: "contact",
recordId: thisId

};

//------ Set the navigation options. Note: Position defaults to 1 (modal) but you can choose 2 (side pane, right hand side). -------//
//------ Also note that you can use percentages for the width and height units. This is handy for this application, It means that it will change depending on screen size ------//
//------ The title will be what is displayed in the top bar ------//

var navigationOptions = {

target: 2,
position: 1,
width: {
value: 90,
unit: "%"
},

height: {
value: 90,
unit: "%"
},

title: "Contact Viewer"
};

//------ This is where the magic happens. Documentation available on microsoft docs, I google xrm.navigation and it was the first result. ------//

Xrm.Navigation.navigateTo(pageInput, navigationOptions).then();
}

show more

Share/Embed