Pages

Tuesday, 26 December 2017

Trigger events on select of Business process flow Stage CRM2016


Attach event onLoad of CRM2016 Form

function onload()
{

Xrm.Page.data.process.addOnStageSelected(stageselected);

}

function stageselected(args) {

alert(Xrm.Page.data.process.getSelectedStage());

}

Trigger events on change stage of Business process flow in CRM2016

Display tabs on CRM2016 form based on Business process flow stage changes


// Attaching event onload of form
function onload()
{
Xrm.Page.data.process.addOnStageChange(stagechange);
Xrm.Page.ui.tabs.get("tab_2").setVisible(true);

}

function stagechange() {
alert("sucess");
Xrm.Page.ui.tabs.get("tab_2").setVisible(false);

}

CRM2016 - Navigate Associated view from Entity form Without moving to top Sitemap

Recently i had a requirement : user should able to navigate SP document  associated view by clicking HTML web resource button on CRM2016 form .


i use below code on to achieve this


Xrm.Page.ui.navigation.items.get("navdocuments").setVisible(true);


Xrm.Page.ui.navigation.items.get("navAddresses").setFocus();