Display a button in ribbon when arriving to a step of a stage in a process flow in Dynamics CRM 2015 -


i need help: how can display button in ribbon when arriving step of stage in process flow in dynamics crm 2015?

thank in advance !!

you can use following code process stage:

xrm.page.getattribute('stageid').getvalue() 

and following code ribbon button:

var btnrunworklfow=top.document.getelementbyid("account|norelationship|form|mscrm.form.account.runworkflow-large"); 

to hide button, can use javascript similar in 1 in 1 of form or control events:

var stageid = xrm.page.getattribute("stageid").getvalue(); if (stageid == 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx') {      var btnrunworklfow=top.document.getelementbyid("account|norelationship|form|mscrm.form.account.runworkflow-large");     btnrunworklfow.style.display='none';  } 

you can use ribbon editor available in codeplex disable button based on javascript.

refer: http://crmvisualribbonedit.codeplex.com/

this useful link: hiding/showing section based on current stage


Comments