Power Dynamics
  • Power Dynamics
  • 🍕My name
  • D365 CE
    • Copilot
      • 🥐Add Copilot into Rich Text Control
    • Sales
      • Copilot in D365 Sales
      • Export record to PDF
    • Customer Experience
      • Contact Center (Omnichannel)
        • 🐚Internal Live Chat in MDA
        • 📢Add Chat Widget to Power Pages - Proactive Chat
      • Attachment Control
      • Case Routing: Basic Routing rule set
      • Custom SLA for any Entity
      • Customer Insight
        • Journey - Custom Trigger - Call Power Automate
    • Field Service
  • Power Platform
    • Analytics
    • Dataverse
      • Use case for the feature of Record ownership across Business Unit
      • 💡Workaround: Change the OOB "Exchange Rate" of a record
      • Using a Virtual Entity to store historical log (sample)
      • Disable Empty Address record
      • Using Adaptive card
      • Block Unmanaged Customizations
      • 🪃Recycle Bin on Dataverse (Preview)
    • Model Driven App
      • 💡Run SSRS report on MDA mobile
      • 💡Tip: Create a Security Role with "App Opener" minimum privileges
      • Tag @person to notify in MDA
      • Auto search on the Lookup field
      • Activities with multiple related records
      • Embedded Power BI - Dashboard
      • Embedded Power BI - Form
      • "Custom Help" - Is it help?
      • New modern Command Bar
      • Tip: Hide the button "Add Existing Record" on subgrid
      • Custom Page - Why not?
      • Hiding sensitive column data
    • Canvas App
    • Fabric & Power BI
      • New Text slicer
      • Dataverse link to Microsoft Fabric
      • 💡Leveraging Interactive Warehouse Floor Maps in Power BI
      • Calculation Group for Time Intelligence
    • Power Automate
      • ✅Sequential Approval
      • 📤Create an Appointment by Outlook Graph API
      • Dowload SSRS Report and Send email
      • Power Automate: Add a table in Email
      • 💡Tips: Get "DisplayName" of the Lookup field on Power Automate
      • E-sign: Power Automate & DocuSign
  • D365 Finance & Operation
    • General
      • 🇻🇳D365 FnO - Virtual entities: Use case
    • Finance
      • Consolidating Customer & Vendor Balances
    • Supply Chain
      • Landed Cost Series
        • Landed Cost- Essential Configuration
        • Landed Cost Scenarios 1
Powered by GitBook
On this page
  • Custom Page vs Embedded Canvas App
  • Create Custom Page
  • Add Custom Page in MDA
  • Tip: Run CustomPage by PowerFx
  • Checking my result

Was this helpful?

  1. Power Platform
  2. Model Driven App

Custom Page - Why not?

#MDA, #ModelDriven, #CustomPage, #PowerFx,#ModernCommandBar

PreviousTip: Hide the button "Add Existing Record" on subgridNextHiding sensitive column data

Last updated 1 year ago

Was this helpful?

Today, I want to share something about using the Custom Page in the Model Driven app.

Custom Page vs Embedded Canvas App

Firstly, I would like to share my thoughts outlining the differences between Custom Pages and Embedded Canvas Apps in terms as shown in the table below:

Aspect
Custom Page
Embedded Canvas App

Standalone Usage

Yes, as a navigation item in the Model-App menu.

Yes, as a standalone app on various platforms.

Embedding Capabilities

Popup, flyout, and side pane integration.

Integration in Model-driven forms, Teams, SharePoint, and Power BI Reports.

Record Context

Yes, can access Model App context.

Yes, operates within the record context in Model App.

Standalone App Execution

No, cannot run independently.

Yes, can run as a standalone app.

Licensing Considerations

No additional licensing required.

Potentially requires additional licensing for paid/custom connectors.

Sharing Requirement

No need to be explicitly shared; inherited from Model-Driven App.

Requires sharing with users for app execution.

Ideal for Use Cases

Extending functionality within existing processes.

Involving connectors beyond Model Apps/Dataverse functionalities.

Hopefully, it can help

Okay... now I will create a custom page and seamlessly integrate it into the Model-Driven App.

This is a practical example, showcasing the steps involved in developing and incorporating a custom page within the Model-Driven App environment.

Create Custom Page

Go back to the Solution and click New > App > Page. Following that, I crafted a Custom Page titled "Deal Page" This particular page is designed to display the associated Deals of the current Account on which you are currently positioned.

Add Custom Page in MDA

After finishing my custom page, I will add this page to my Model Driven-App.

Edit App with New Designer > click Add Page > choose Custom page and click Next

Next, select "Using existing custom page" and select my page - "Deal Page" >> Click Add

Finally, click Save and Publish App

"Show in navigation" - choose this option If you want to show your page on the app navigation.

Now, check my custom page in MDA

Tip: Run CustomPage by PowerFx

I plan to create a new button on the subgrid "Deal" on the main form of Account. This button will open the "Deal Page". This page will only display the deals that are associated with the current Account.

I choose to create the Command by Power Fx.

My button is called "Edit in Deal Page".

My command will run the action Java Script as an image. The button will call the js and open my page as Centered Dialog.

Note: Your custom page should add the filter() for items that you want to show records associated with the current parent item.

Note: Your custom page should add the filter() for items that you want to show records associated with the current parent item.

In my scenario is Account Id (primaryItemId) - input for my custom page.

Below is my sample. In my sample, I used 3 parameters:

  • PrimaryControl: so we can refresh the page after the Dialog closes.

  • PrimaryItemId: used in the Custom Page Dialog to relate the Deal record to the Account.

  • PrimaryEntityTypeName: used to check if the Dialog is bound to the Account.

// my js sample
function OpenInDealPage(primaryControl,primaryEntityTypeName,primaryItemId)
{// Centered Dialog
var pageInput = {
    pageType: "custom",
    name: "ntd_dealpage_4a9fd",
    primaryEntityName: primaryEntityTypeName,
    primaryItemId: primaryItemId,
};
var navigationOptions = {
    target: 2, 
    position: 1,
    width: {value: 800, unit:"%"},
    title: "Associated Deals"
};  
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
    .then(
        function () {
            primaryControl.data.refresh()
        }
    ).catch(
        function (error) {
            // Handle error
        }
    );
}

Checking my result

Open the Account main form:

Testing...

Reference: to show some steps to create a custom button.

For the details of navigating of custom page, you can check from the

Hopping well. Thank you... [NTD]yns.asia ... Thank you.

New Modern Command Bar
Microsoft Link.
🎉
☕
❤️
invite me a cup.
☺️
New Custom page - named: "Deal Page"
Add Page into MDA
Select "Deal Page" and Add to MDA
Check my custom page on Navigation
Create command by Power Fx
"Edit in Deal Page" command
Configure command to open the custom page "Deal Page"
Test the custom command - open Custom Page
Custom command and Custom Page