Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Hide custom ribbon button on selected business process flow stage

$
0
0

I want to hide a custom ribbon button if a certain stage is selected or active in the business process flow . I am able to hide it when the stage is set active but the same doesn't happen when it is selected . Can someone let me know if i am missing something in the code below ?  TIA

function hideButton() {

var activeStage = Xrm.Page.data.process.getActiveStage();

var selectedStage = Xrm.Page.data.process.getSelectedStage();

var activeStageName = activeStage.getName();
var selectedStageName = selectedStage.getName();

if (selectedStageName == "" || activeStageName =="" ) {

return false;
}
else {
return true;
}

}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images