إشعار
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تسجيل الدخول أو تغيير الدلائل.
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تغيير الدلائل.
The sample in this article demonstrates how you can build simple custom pages that open as dialogs when a command is selected. You might also call a cloud flow from the custom page dialog.
Prerequisites
Create a command
First, you need to determine the table and command bar location to place the command.
Open the app designer, and then add the desired table to your model-driven app. More information: Build your first model-driven app
Publish the app.
Select the desired table view from the Pages area in the app designer.
Select ... (ellipsis), and then select Edit command bar.

Select the location of the command bar you want, and then select Edit. More information: Command bar locations

Select + New on the command designer command bar, and then enter the command properties. More information:
- Create a JavaScript web resource for your command.
- For other properties, see Create a new command.
Create a JavaScript web resource for your command
Note
This commanding customization currently supports only JavaScript. Power Fx isn't supported.
- For the command properties Action, select Run JavaScript.
- Select + Add library.
- On the Add JavaScript Library list, select + New web resource to create a new JavaScript web resource.
- On the New web resource pane, enter a Name, and optionally a Display name and Description.
- For Type, select JavaScript (JS).
- In the Code box, paste your JavaScript. For example, depending on the type of dialog you want to use, copy and paste an example from the Navigate API reference .
- Select Save and publish to save and publish the web resource.
- Close the browser window tab to return to the command designer.
Call the JavaScript from your command
In the Add JavaScript Library dialog, select the library (web resource) you created in the previous steps, and then select Add.
Tip
If you can't find the web resource, enter the name in the Search box.
In the Command properties pane, if the name isn't specified, enter the name of the JavaScript Function. In this example, openDialog is entered.

Optionally, change the Visibility logic.
Select Save and Publish.
See also
Design a custom page for your model-driven app