Hi all,
I've a custom page created (with schema name "vi_uploadhubblereport_ca3ef").
I add a custom command to the form to open the custom page with the record guid.
To do that, I've added the follow js code as web resource to my solution:
function openCustomPage(formContext)
{
var pageInput = {
pageType: "custom",
name: "vi_uploadhubblereport_ca3ef",
recordId: formContext.data.entity.getId().replace(/[{}]/g, ""),
};
var navigationOptions = {
target: 2,
position: 2,
width: {value: 500, unit: "px"}
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
.then(
function () {
// Called when page opens
}
).catch(
function (error) {
// Handle error
}
)};
My settings for the commandbar:

When I press the new command control from my main form, there is nothing happens. The custom page will not be opened and also there is no error or something else happens.
Does anyone know what I doing wrong.