Hi Experts,
any ideas on how to achieve this, i have to achieve this when user open the record, move to next stage.
Thanks
*This post is locked for comments
Hi Experts,
any ideas on how to achieve this, i have to achieve this when user open the record, move to next stage.
Thanks
*This post is locked for comments
Hi Alex,
Thanks for the help, it is working now.
Hi,
furthermore if you plan to migrate to dynamics 365, it is not recommend to directly read the stage id via below method
var stageID = Xrm.Page.getAttribute(“stageid”).getValue();
For more information , please refer to below article.
Hi,
you can use the below code to achieve it.
function checkBPF()
{
var activeStage = Xrm.Page.data.process.getActiveStage(); // get the current stage of bpf
var stageId = activeStage.getId(); // stage id
var stagename = activeStage.getName(); // stage name
alert(stagename);
// you can apply your if else logic to show hide the tab, you can use stageid or stagename, depending on your preferences.
if( stagename == "Qualify") // i would recommend to use stage id
{
Xrm.Page.ui.tabs.get("Qualify").setVisible(true); //set your tabname here.
Xrm.Page.ui.tabs.get("anothertab").setVisible(false);//set your other tabname here.
}
else if ( stagename == "otherstage")
{
Xrm.Page.ui.tabs.get("anothertab").setVisible(true);
Xrm.Page.ui.tabs.get("anothertab").setVisible(false);
}
}
function formonload()
{
Xrm.Page.data.process.addOnStageChange(checkBPF); // this will help you to trigger the function when user click move to next stage
checkBPF();
}
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
52
Victor Onyebuchi
6