Tuesday, 20 October 2015

Add a button in CRM 2013/2015 using Ribbonworkbench

Most of the times we get a requirement to add a button on the CRM OOB forms for full filling business needs.

Here are the steps for adding a button

1) Download Ribbon Work Bench solution from the following linkDownload Ribbon WorkBench
2) Import the solution to CRM.
3) Create a solution with the entities and web resources where you wanted to add a button. In my case, its on Opportunity.
4) Go to CRM-> Settings->Solutions.
5) You will see a link with name "RIBBON WORKBENCH" as shown in the below screen shot.

6) click on link and it will open a pop-up to select the solution to open.
7) The workbench all the information related to the entities from the solution.

8) Click on Ribbon tab button as shown in the figure.
9) You will see a dropdown on the top right side window for selection place to show the ribbon button. In my case, I would like add a button on the Opportunity Form.

10) Drag the button from left and release it in the place where you wanted to create a button.
11) Select the button and give the details like label, description, Image etc..

12) Select Commands and click on Add New

13) It will create a command for you. Expand Command and right click on the command. It will display you to select Display Rules, Actions and Enable Rules.
14) Select Actions and it will open a pop-up.
15) Click on Add button, it will open a pop-up to select a JavaScript function or a URL. If you want to open and HTML web resource or any URL, you can just give the URL by selecting the Open URL Action. If you want trigger any JavaScript method on the click of the button, select JavaScript Function Action.

 
16) Click on JavaScript Action and give Function Name which you wanted to trigger on the button click, web resource name and parameters if any.
17) Expand Buttons and select the button which was created.
18) Click on Command dropdown as shown in the screen shot. You will see the command which you have created, select that and click on Publish button on the top.


19) Click on Publish button.
Here is the output.

Hope this helps.

--
Happy CRM'ing
Gopinath

2 comments:

  1. Where do you create the Jaavascript command so you can retrieve in Step 15 and 16? I created a Dialog as a Process to come up when the button is pushed to close a Quote. I can't figure out call that dialog.

    ReplyDelete