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:
Any support would be appreciated.
Best regards,