Open custom page from modern command button
JS code
function openPriceuploadpage(primaryControl, firstSelectedItemId, selectedEntityTypeName)
{
// price upload page
var pageInput = {
pageType: "custom",
name: "cd_pricelist_a8ed3",
entityName: selectedEntityTypeName, // "sample_review"
recordId: firstSelectedItemId // "{087AA308-B321-E811-A845-000D3A33A3AC}"
};
var navigationOptions = {
target: 2,
position: 1,
height: 300,
width: 300,
title: "Pricelist Upload"
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
function () {
// Refresh the main form when the dialog is closed
primaryControl.data.refresh();
}
).catch (
function (error) {
// Handle error
}
);
}
Custom page On start to get the GUID of the current record if we use the below code we can get only GUID not as object.
Set(varlabID,GUID(Mid(Param("recordId"),2,Len(Param("recordId"))-2)));Set(labId,LookUp(Labs,Lab=varlabID))
Modern command button configurations:
Comments
Post a Comment