This feature requires an add-on that you can request via the PDF Butler support team. Just email them or request it via your Account Manager
Document linked to record #
Provide a document to be used against the PDF Butler configuration. The document in the PDF Butler configuration will be ignored and the provided document will be used.
Class to use: PDFB_Actionable_DocConfigOverride
In case you have a DOCX file in Salesforce Files that you want to inject into the generated document.
Document linked to DocConfig #
If you do not want to use a DOCX linked to the DocConfig configuration but want to store the template in Salesforce linked to your DocConfig. This can be easily achieved with the Actionable listed below
In the configuration screen, it is required to upload a main template but this can be a “dummy” template with no text, images, … but only the mergefields used in the configuration. This “dummy” document is required for validation, type-ahead help during configuration, …
Class to use: PDFB_Act_DocOverrideFromDc
- Save the template to the DocConfig record in Salesforce. It is possible that the FILES section does not show on the DocConfig but you can just edit the Page Layout and add the FILES section as a related list.

- Add the Actionable to the Doc Config (if you are using a Pack, the Actionable also has to be added to the Pack!):
- New Actionable with Record Type: Doc Config Override
!! If the Record Type does not show, make sure to add it to a Permission Set or to the Profile

- Complete the Actionable
- Name: Choose a fitting name
- Doc Config: Lookup to the Doc Config it has to be linked to
- Class: PDFB_Act_DocOverrideFromDc
- When: BEFORE
- Active: Make sure to check this box
- Pack: Lookup to the Pack it has to be linked to. Leave empty if you do not use a Pack
!! You can use the same Actionable for the Doc Config and for the Pack - Doc Config Override: Lookup to the Doc Config. This is a mandatory field, choose the Doc Config (will be the same as the Doc Config Lookup)
!! When you use the Actionable only on the Pack, the Doc Config Lookup will be empty - Override File Name: The filename to lookup, you can use wildcards with “%”
- New Actionable with Record Type: Doc Config Override
Document linked via APEX #
You can also create your custom logic and override the template via a custom APEX Actionable or create a custom component.
If you install the add-on package, you have access to the APEX code and can use that as an example.
To provide the override: API for Doc Config Override