Repository navigation
Replies: 2 comments
|
Moving to the Ideas section of Discussions. |
0 replies
|
Yes. That would be awesome. The fact that it maybe could than run on the power Apps Mobile App is nice too. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Custom pages can be used inside a model-driven app: as a page in the app's navigation, on a form, and as a dialog or side pane opened from a command. The model-driven app passes the user's authentication and the context (table, record id) to the page. Code apps can't do any of this today: they only run standalone in the Power Apps player.
Please let code apps be hosted by a model-driven app in the same three ways as custom pages, with the authentication and the context passed by the model-driven app:
Xrm.Navigation.navigateTo), like a custom page can.For all three: the model-driven app passes the authentication to the code app, just as it does for a custom page: no second sign-in, no extra consent, no separate player session.
Below a screenshot of the Model Driven App add Page option:

Why
navigateTowithpageType: "custom"); with code apps it doesn't.getContext()from@microsoft/power-apps/app). The same model would work when the host is a model-driven app.How it could work (suggestion)
getContext()returns the table and record idXrm.Navigation.navigateTo({ pageType: "custom", name, entityName, recordId }, { target: 2, position: 1 / 2 })Scott Durow approach:
https://www.youtube.com/watch?v=99uU5gGN15w
navigateTo({ pageType: "codeapp", name, entityName, recordId, data }, { target: 1 / 2, position })— full page, dialog or side paneXrm.Navigation.navigateTo({ pageType: "custom", name, entityName, recordId }, { target: 2, position: 1 / 2 })navigateTo({ pageType: "codeapp", name, entityName, recordId, data }, { target: 1 / 2, position })— full page, dialog or side paneParam()in Power Fx@ModelDrivenIntegrationin Canvas or PagegetContext()extended, e.g.host: "modelDrivenApp",appId,entityName,recordId,formType, customdataBack(), close the dialogBonus: when a code app is shown inside a model-driven app, its own header is hidden automatically (the model-driven app's header is enough).
Additional Consideration
Yes I am aware that we can use custom components to add functionality to a dataverse form. But in my opinion it would make sense to streamline the experience over multiple usecases, therefor it would make sense to enable CodeApps to host the integration options of the Custom page, so it can be used in a wide area of usecases.
With adding this feature we as consultants and developers get extended choices on how to implement functionality. We can decide to go full low code - canvas apps and pages -, full pro code - with codeapps and (optional) custom components - or hybrid - all types based on the specific usecase -. This makes sense I hope.
Environment
pa1.3.0,@microsoft/power-apps1.5.0.All reactions