Adding a dox42 button via Ribbon Workbench

Prev Next

Prerequisite

Step 1: Creating the button

Steps

  1. Set up a new solution.

    1. Go to Settings > Solutions

    2. Select the New button.

    3. Add the entity to which you want to add your dox42 button. You can also upload the custom icons for your ribbon buttons here.

    4. Select the Save icon.

  2. Open your newly added solution.

  3. Go to Settings > Customization > Ribbon Workbench.

  4. In the Toolbox window, select one of the following entries and drag it to the desired position on your ribbon:

    1. Button: for a regular button

    2. Split Button: for a drop-down menu. Afterwards drag a Menu Section to the Split Button.

  5. Enter values into the text fields

    1. ID,

    2. label and

    3. description.

  6. From the Image 16 and Image 32 select the desired icons for the button.

  7. 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.

  8. 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.

  9. 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.

  10. 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

  1. Open your solution.

  2. Go to Settings > Customization > Ribbon Workbench.

  3. Select the button to which your want to add a command to.

  4. To add a command to your button select the + button in the Command Bar > Solution Elements window.

  5. In the Id text field enter a name.
    Example: dox42.account.CreateDocument.Command

  6. To add the first action:

    1. In the Actions section select the ADD ACTION button > Javascript Action.
      A form for the new custom Javascript action opens.

    2. In the Library text field search for your desired Javascript file and select the entry.
      Example: dox42_adal.js. This loads the ADAL script.

    3. In the Function Name text field enter the desired function.
      Example: isNaN.

  7. To add the second action:

    1. In the Actions section select the ADD ACTION button > Javascript Action.
      A form for the new custom Javascript action opens.

    2. In the Library text field search for for your desired Javascript file and select the entry.
      Example: dox42_clientlib.js.

    3. In the Function Name text field enter the desired function.
      Example: generateFile.

    4. Select the Add parameter button > String parameter.

    5. 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.

    6. Select the Add parameter button > Crm parameter.

    7. In the Value Menu select the SelectedControlSelectedItemIds entry.

    8. Repeat these steps with as many dox42 commands as you may need.

    Custom JavaScript actions for generating documents and handling parameters in a web application.

  8. Add a button with Ribbon Workbench on every entity you want be displayed in your pop-up .

  9. To publish your solution select the Publish button in the upper left corner of your Ribbon Workbench.

Result

The buttons execute the configured action.

Sales quote summary for solar panels including customer and pricing details.