
Announcements
Hello,
I have a canvas app which is running on top of CDS/CRM/CE data, and now I would like to embed this canvas app into a model driven app. Is there any way that I can embed this app as a replacement for Quick create form, or can I embed this app into a quick create form and load that Quick create form on a plus button click from the subgrid?
I'm trying to achieve the same functionality as here : https://docs.microsoft.com/en-us/dynamics365-release-plan/2020wave1/dynamics365-sales/enhanced-experience-adding-products
Thanks,
Satya
Hi @satya3999 ,
Do you want to replace the "Quick Create Form" with the embedded canvas app when you click the "+" button, or embed the canvas app within your "Quick Create Form"?
If you want to replace the "Quick Create Form" with the embedded canvas app when you click the "+" button, or embed the canvas app within your "Quick Create Form", I afraid that there is no way to achieve your needs in PowerApps currently.
Currently, embedded canvas app functionality is only available in Main Form of CDS Entity, it is not available in Quick Create Form. If you would like this feature to be added, please consider submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
As an alternative solution, you could consider add a custom ribbon button in your Sub Grid Top Menu, press the custom ribbon button to open your canvas app through Model-Driven app Client API -- Xrm.Navigation.openUrl().
Firstly, you need to create a JavaScript file like below:
function launchCanvasApp(executionContext){
var openUrlOptionObject = {
height: 300,
width: 200
}
Xrm.Navigation.openUrl(
"https://apps.powerapps.com/play/xxxxxxxx-87b2-xxxx-8948-86529f53887a?tenantId=xxxxxxxx-f6a5-41a2-xxxx-9785a9d6c706", // the Web URL of your canvas app
openUrlOptionObject
)
}
then add this JavaScript file as web resource in your corresponding solution which your Model-Driven app hosted on. After that, you could use the Ribbon Workbench Tool to add custom Ribbon to the Sub Grid in your Entity Main Form.
Note: The Xrm.Navigation.openUrl() client API would open the canvas app in a new browse tab rather than within a dialog box.
More details about creating custom ribbon buttons in Model-Driven app form, please check the following video:
https://www.youtube.com/watch?v=KmtV6LkWjzc&t=3s
Best regards,