Calling dox42 using a button in the List/Library Ribbon

Prev Next

For a hands-on example, follow these instructions to generate a list of all employees directly from SharePoint, using a button in the SharePoint list/library ribbon.

Steps

  1. Upload your document template and data map to a SharePoint document library (e.g. dox42Templates). Alternatively, you can also store the document template and data map directly on your dox42 Server in the file system.

  2. Create the REST link for the dox42 Return Action with one of these options:

    Important

    Please make sure that you have installed the dox42 Server properly and that the dox42 Server is allowed to read data from SharePoint:

    • To create the REST link, please see the dox42 Server Documentation.

    • Open the dox42 Server Client and select the REST URL button in the bottom right corner.

    • dox42 Server TestClient interface showing document generation parameters and options.

      dox42 Server Test Client

  3. Open the list/library for which you want to create the button in SharePoint Designer.

  4. Go to the LIST SETTINGS ribbon.

    SharePoint Designer interface displaying employee list settings and customization options.

    LIST SETTINGS ribbon.

  5. Select Custom Action > View Ribbon.
    The Create Custom Action dialog opens.

    Creating a custom action to generate a PDF employee list using dox42.

    Create Custom Action dialog

  6. Enter a name and a description.

  7. In the Select the type of action section, select Navigate to URL and enter the dox42 REST link.

  8. Optional: You can add a button image URL in the Advanced custom action options section.

  9. Select OK.

Result

The green dox42 button will now show up in the SharePoint “Files” ribbon.

Security Advice

The best way to secure dox42 calls in SharePoint Online is to use dox42 Entra ID integration.

Without configuring Entra ID integration, the SharePoint user login, authentication and permissions are not used for the dox42 call as this REST call is simply a URL. If someone knows your dox42 Server URL, templates, and input parameters, and has got the permission to call the dox42 Server he/she will be able to call this or a modified URL using any browser independently from SharePoint. So, if your SharePoint list contains sensitive data, be careful!

A simple way to get more security is to add an additional input parameter to your data map to send some kind of pass phrase. Check the pass phrase in your dox42 data map using a dynamic field and throw an exception if not correct. You can even make the pass phrase dynamic using some JavaScript in the dox42 REST link. This method is obviously not bulletproof but easy to realize and offers a reasonable level of protection.