Prerequisite
Step 1: Creating the button
Steps
Set up a new solution.
Go to Settings > Solutions
Select the New button.
Add the entity to which you want to add your dox42 button. You can also upload the custom icons for your ribbon buttons here.
Select the Save icon.
Open your newly added solution.
Go to Settings > Customization > Ribbon Workbench.
In the Toolbox window, select one of the following entries and drag it to the desired position on your ribbon:
Button: for a regular button
Split Button: for a drop-down menu. Afterwards drag a Menu Section to the Split Button.
Enter values into the text fields
ID,
label and
description.
From the Image 16 and Image 32 select the desired icons for the button.
If you want your icon to appear in Dynamics CRM Modern UI, in the Modern Image menu, select the same value you selected for Image 32.
To add a drop-down button, select “Split Button” (1) and drag it to the desired position on your ribbon (2), then drag a “Menu Section” (1) to the Split Button.
To add commands to your button, select the + button in the Command Bar > Solution Elements window.
Note
For more information on adding commands see Option 1: Integrating the dox42 calls as buttons.
Select the Publish button.
Ribbon Workbench is publishing the new button, which can take a while.
Result
Your new dox42 button is displayed in your CRM interface.
Step 2: Adding actions to the button
Steps
Open your solution.
Go to Settings > Customization > Ribbon Workbench.
Select the button to which your want to add a command to.
To add a command to your button select the + button in the Command Bar > Solution Elements window.
In the Id text field enter a name.
Example:dox42.account.CreateDocument.Command
To add the first action:
In the Actions section select the ADD ACTION button > Javascript Action.
A form for the new custom Javascript action opens.In the Library text field search for your desired Javascript file and select the entry.
Example:dox42_adal.js
. This loads the ADAL script.In the Function Name text field enter the desired function.
Example:isNaN
.
To add the second action:
In the Actions section select the ADD ACTION button > Javascript Action.
A form for the new custom Javascript action opens.In the Library text field search for for your desired Javascript file and select the entry.
Example:dox42_clientlib.js
.In the Function Name text field enter the desired function.
Example:generateFile
.Select the Add parameter button > String parameter.
In the Value text field enter the name of the template configuration.
Example:CompanyList
More information on Adding the template configuration to the dox42 pop-up web resource.Select the Add parameter button > Crm parameter.
In the Value Menu select the SelectedControlSelectedItemIds entry.
Repeat these steps with as many dox42 commands as you may need.
Add a button with Ribbon Workbench on every entity you want be displayed in your pop-up .
To publish your solution select the Publish button in the upper left corner of your Ribbon Workbench.
Result
The buttons execute the configured action.