This article outlines how to add the DocumentsCorePack (DCP) [Create Document]-button for MS CRM 2011 to your form.
Requirements: DocumentsCorePack for MS CRM 2011, Ribbon Workbench for CRM 2011
To add the button, you must install the Ribbon Workbench for CRM 2011. (which can be downloaded here)
Please find the manuals here:
Result: Once added, the [Create document]-button looks like shown in Figure 1.
How to add the DocumentsCorePack [Create Document]-button
First, open CRM and create a new solution. To do so, please navigate to Settings > Solutions. Name the solution as you wish.
Once saved, the form will reload. Click on the [Add Existing]-button and Entity.
In the next window, select the entity to which the DCP-Button should be added (here: Account). Then click on the [OK]-button.
On the next page select the No, do not include required components-option and click on the [OK]-button.
Next, click on the [Add Existing]-button again. But this time, please select Webresource.
The window that pops up now will show you all installed webresources. Select ptm_Icon16x16, ptm_Icon32x32 and ptm_dcp_js_jslibrary.
Figure 7: Select web resources
Your solution window will look like shown in Figure 7.
Next go to the solution section of CRM again. We recommend to create a backup. To do so, mark your newly created solution and click on the [Export]-button.
Click through the dialog. Please note: It is of utmost importance that you select Unmanaged on the last page.
Click on the [Export]-button in order to proceed.
Now you can start to create the button.
In the solution-section of CRM, double-click on the RibbonWorkbench-solution.
Now the Ribbon Workbench opens. First, select the solution you have created before (which contains the entity and the DCP web resource).
The loaded RibbonWorkBench will look like shown in Figure 12:
Now select Form in the dropdown-box in the right upper corner.
Thereafter, select Group and drag and drop it to any place on your form.
Then select the newly added group in the form. Please find its properties on the right side. You can assign a specific ID to your group.
Now add a button to your group, again via drag and drop.
Change the ID, select your images and name it.
Next, add the command of the button. Right-click on Commands > Add new.
On the right-side, you can see all properties of the new command. We recommend to give it a meaningful ID.
Then hit on the lookup-field next to Actions. In the window that pops up now, click on the [Add]-button.
In the FunctionName-type in DCP.Lib_Registry.printInWord and for Library select ptm_dcp_js_jslibrary. Click on the [OK]-button.
Back in the WorkBench, mark your button, to see its properties on the right side.
For Command select the newly created command via the ID.
Now that the configuration is done, click on the [Publish Solution]-button in order to import and publish the new solution containing the button.
After the process has been finished, your button will be available and ready to use on the Accounts form.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to firstname.lastname@example.org.