- August 1, 2016
- Posted by: Raz Dynamics
- Category: Microsoft Dynamics CRM
Passing a Parameter on a Button Click is useful if you want to execute a custom Workflow or Action by accepting parameters when the button is clicked, as you will want the behaviour for each button to perform a different request, so setting the parameter for each button allows the user to execute tasks using Actions, Workflows or Customs plugins and integrations.
1) Once you have created your new button in RibbonWorkbench, right click the button and Click Customise Command
2) Find the Customise Command for the button you just created, Right Click on the Customise command and select Edit Actions
3) Click Add button, and add the: JavaScript Function Action as shown below;
4) Add a Javascript Function Action and set the following;
· Provide Function Name: The Function being called in the Javascript WebResource
· Web Resource : The JavaScript Webresource
· Parameter: the Parameter that is being passed to the Function
Click OK and click publish
PS . The JavaScript Web resource can then be used such as to Pass Parameters to execute an Action Process or trigger Workflow Activity etc.