Open canvas app with Customize the command bar using command designer

 

This topic guides you through creating and editing modern commands using the command designer and Power Fx.

Create a new model-driven app using modern app designer

1.     Sign into Power Apps

2.     On the left navigation pane, select Solutions and then open or create a solution to contain the new model-driven app.

3.     Select New > App > Model-driven app

4.     Select Modern app designer, and then select Create.






  Enter a Name for your app, and then select Create. More information: Create a model-driven app that has an account table page


1.     On the left navigation pane, select Solutions, and then open the solution containing the existing model-driven app.

2.     Select the model-driven app, and then select -- > Edit > Edit in preview to open the modern app designer.




2.     Click on Add page


3.     Based on your requirement select either options, I have selected Customer(preview) as per my requirement.


5. We need to select on which entity we need to add our custom button


6.     Once entity is added, select that entity, and click on edit as show as per screen.


7.     In below screen you have option where you want to add button, Based on your requirement add button.









Add below code in script.js

Note: Replace your app name in blow code.

function opensidedialog() {

var pageInput = {

pageType: "custom",

name: "cr67e_submiteaccountinfo_3fc1b",

};

var navigationOptions = {

target: 2,

position: 1,

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

title: "Add Account"

};

Xrm.Navigation.navigateTo(pageInput, navigationOptions)

.then(

function () {

// Called when the dialog closes

}

).catch(

function (error) {

// Handle error

}

);

}










 

}

);

}



























Comments

Popular posts from this blog

How to implement approval in Teams using Adaptive Cards

HTTP Request Methods

Get Dynamic 365 field metadata in a canvas app using DataSourceinfo function.

Create barcode using power automate and scan using power app