Run workflow on ribbon button in Dynamics CRM



To run workflow on ribbon button. follow the below steps:

1. Activate your Workflow and get "ID" of workflow.
2. Prepare new solution with entity and related require components also.
3.Open "Ribbon workbench solution". Select the Solution created by you in which you want to create a new button.
4. Drag the button and drop as per your requirement.
5. Give specific name, create command for that button, etc.
6. Now "enable rules"  for that button. As IS CORE = 'TRUE" by default it will be false.


7.Click on "commad " and add this following as shown in below screenshot.
“/_static/_forms/form.js”
and in the Function Name field= “Mscrm.FormAction.launchOnDemandWorkflowForm“.




8.After that in ribbon workbench click on "Publish". 
Go to CRM instance and refresh the page. Open the respective entity where the Button is created.
9.Based on workflow click on button it will run like this below screenshot. 
10. We have deployed workflow in Ribbon workbench button.





1 comment:

  1. Create a field and configure that workflow to run on change of the field. Now using the button, you can change the value of the field and save the form. This will trigger the WF. Contacts us for Dynamics CRM Sydney.

    ReplyDelete