Search This Blog

Wednesday, June 24, 2015

Run Workflow on Button Click without code in CRM 2013

Button on Home Page:


Click on Button and Add a Command.
Add a JavaScript Command and set the following properties:

Function Name: Mscrm.GridRibbonActions.launchOnDemandWorkflow
Library: dev1_/RWB2013/Silverlight.js (for CRM 2013)
Parameters:
1: Type = Crm Parameter, Value = SelectedControl
2: Type = Crm Parameter, Value = SelectedControlSelectedItemReferences
3: Type = Crm Parameter, Value = SelectedEntityTypeCode
4: Type = String, Value = Workflow GUID

 Button on Form:

Click on Button and Add a Command.
Add a JavaScript Command and set the following properties:

Function Name: Mscrm.FormAction.launchOnDemandWorkflowForm
Liibrary: /_forms/form.js
Parameters:
1: Type = Crm Parameter, Value = PrimaryEntityTypeCode
2: Type = String, Value = Workflow GUID

2 comments:

  1. How can I evict to trigger a dialog box with options ( click to continue and cancel) and just trigger workflow.
    Thanks

    ReplyDelete