Hello Andrew Butenko,
Thank you so much for your quick response.
this is my JavaScript On Ribbon Button.
JS Code :
function openCustomPageUploadDocument(pageContext) {
debugger;
var formContext = pageContext;
var currentID = formContext.data.entity.getId();
currentID = currentID.replace("{", "").replace("}", "");
// Centered Dialog
var pageInput = {
pageType: "custom",
name: "new_mycustompage_d7abc",
entityName: formContext.data.entity.getEntityName(),
recordId: JSON.stringify({ parentID: currentID, parentLogicalName: formContext.data.entity.getEntityName()})
};
var navigationOptions = {
target: 2,
position: 1,
height: { value: 80, unit: "%" },
width: { value: 70, unit: "%" },
//title: "Document Uploading"
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)
.then(
function () {
pageContext.data.refresh();
}
).catch(
function (error) {
alert("Error...");
}
);
}
Custom Page App onStart :
Set(
inputParameters,
JSON(Param("recordId"))
);
Set(
Test,
Match(
inputParameters,
"\""parentID"":""(?<parentID>[^""]*)"",""parentLogicalName"":""(?<parentLogicalName>[^""]*)"
)
);