Hi everyone,
I am trying to open a custom page from a model driven app from a custom button selected from the command designer. Unfortunately the custom page does not open when the button is clicked.
I have trawled through the forums trying to identify the cause but I have not come to a solution.
Fixes attempted:
- Used static values first to diagnose the problem
- Doublechecked the custom page is added to the model driven app as well as from the Solution
- Published the custom page and the model driven app and published all customisations on every change
- Used the logical name of the custom page as opposed to the display name
- Ensured you have capitalised the “I” – it should be recordId. However, I have not even got to this point yet because the custom page does not even load
Below is the java script from @dianabirkelbach, only the custom page name has been modified: https://dianabirkelbach.wordpress.com/2021/07/29/how-to-make-dialogs-for-model-driven-apps-using-custom-pages/
function openCustomPage(pageContext){ Xrm.Navigation.navigateTo({ pageType: "custom", name: "new_samplecustompage_off9d", entityName: pageContext.data.entity.getEntityName(), recordId: pageContext.data.entity.getId() }, { target:2, width: 700, height:400} ) .then(console.log).catch(console.error); }
Command Designer:
Troubleshooting tips already read:
- https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/467872/custom-page-is-not-opening-on-custom-ribbon-button-click/1284041
- https://community.dynamics.com/365/f/dynamics-365-general-forum/475987/how-to-launch-custom-page-modal-dialog-from-an-editable-subgrid
- https://community.dynamics.com/365/f/dynamics-365-general-forum/482230/custom-page-is-blank
- https://powerusers.microsoft.com/t5/Microsoft-Dataverse/custom-page-does-not-open-in-model-driven-app/td-p/1647537
- https://powerusers.microsoft.com/t5/Microsoft-Dataverse/How-to-pass-parameter-to-Custom-Page/m-p/1574006
Any support would be appreciated.
Best regards,