Hello All,
I have created a custom ribbon button in custom entity and on button click the custom page is not opening. I have create JavaScript and script is work in success but custom page is not opening.
Ribbon Button :

JavaScript Run Success :

JavaScript :
function openCustomPageUploadDocument(pageContext) {
var formContext = pageContext;
var pageInput = {
pageType: "custom",
name: "rw_uploaddocument_4d027", //Custom Page
entityName: formContext.data.entity.getEntityName(),
recordId: formContext.data.entity.getId()
};
var navigationOptions = {
target: 2,
position: 1,
width: 780,
height: 500,
title: "Upload Document"
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
.then(
function () {
alert("Success...");
}
).catch(
function (error) {
alert("Error...");
}
);
}
why it is not worked please help me
Thanks & Regards,
Vijay