Tuesday, 25 March 2014

Add Mail merge button in CRM 2013 with Ribbon Workbench

Below is an example on how to modify the Site map using Ribbon Workbench.
Scope: Enable the Mail merge Button on the contact Entity


1. Download the Workbench located (See download fro Crm 2013)
    http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx
2. Import the downloaded Solution in your CRM solution

3. Refresh Your Browser (Ctrl+ F5)
4. Navigate to Settings>Customization. The Ribbon Workbench Should be located there
5. When you open Ribbon Workbench , you will be prompted to Select your Solution
6. The Work Bench looks like this with a vast amount of areas you can edit. You can add toolbox items to the Home, Sub Grid and Form by Drag and Drop
7. To add a button the the contact entity form ribben, Select Form Bar then The command Bar tab , the contact entity and then Buttons

8. Now Select The Ribbon Tab


9. Drag a drop a new Button To the location You want
10.Fill Out the button Properties as below. The id should be unique but the rest of the settings must be as is below


11. You now need to make the Button visible(it is invisible by default)
12. This will add in some Command options

13. Right click on the Mscrm.MailMergeProperty and then Edit Display Rules
14. Remove The Mscrm.HideOnCommandBar
15.Publish. The Mail merge Button is now available on the contact.
Grids

Adding the mail merge button to the Grid or Sub Grid is different.
1. First Add a new Command Called MSCRM.MailMerge.Grid

2.Add a new action of type javascript function action .  Define the FunctionName as Mscrm.GridRibbonActions.webMailMerge and Library as /_static/_common/scripts/RibbonActions.js


3. Add the following parameters
CrmParameter Value="SelectedControl"
CrmParameter Value="SelectedControlSelectedItemIds"
CrmParameter Value="SelectedEntityTypeCode"
CrmParameter Value="SelectedControlAllItemCount"

4. Set the display Rules to the following


5. Set the enabled rules to the following


6. Drag and drop a button from the toolbox to the Grid to the desired location

7. Define the Following Properties in the button




5 comments:

  1. Just followed this link, works fine, but i see one problem, the mail merge button is getting displayed twice, not sure what is going wrong.
    Any idea?

    ReplyDelete
  2. Great post thanks for this - never used this before, and thanks for making it clear!

    ReplyDelete
  3. You, sir, are a steeley-eyed missile man. Thanks very much for this.

    ReplyDelete