...
IMPORTANT: Only template records that contain at least one file will be available in the document generation. Always the last recently uploaded or modified File will be used when creating a document!
Template Configuration
On the “Configuration” sub-tab, template specific configuration settings can be defined:
...
The configuration settings defined on the template override the default settings defined on the specific settings records (see: Initial Setup ).
The following settings can be defined:
Engine Version: Version of the document templating engine to be used. Whenever possible, version 2 should be used. Version 1 is deprecated and doesn’t support all advanced features.
File Name: The file name of the generated document. When defining the file name, merge fields from the queries can be used (e.g. {{Name}}) and also some global variables like @global.date = current date and @global.index = index of documents in case of multiple documents are generated in one job.
Input Format: Default input format. Usually docx. Might be set to pdf in case a static pdf should be merged as part of a multi doc merge.
Output Format: Default output format. Either PDF or DOCX. Will usually be overriden in the merge dialog. However, for automated generation of pdf documents, the default output format can be defined on the template.
Date Locale:
Date Format Pattern:
Date Time Format Pattern:
Number Locale:
Number Format Pattern:
Thousands Delimiter:
Decimal Delimiter:
Static Data
Create an Action Button
To allow the end user to call IdealDoc and create a merge document, a predefined Salesforce screen flow called IdealDocGenericActionScreenFlow can be used.
Because it is currently not possible in Salesforce to pass dynamic parameters to a flow from a quick action (a feature which will be hopefully added by Salesforce in future release), a simple naming convention for the quick action has been defined.
To pass the IdealDoc environment and the information which category of IdealDoc templates should be available for selection the name of the quick action button has to follow a certain naming convention. An example quick action definition looks like this:
...
The name of the quick action needs to comply with the following pattern:
<Any Name>_<Attach to SF (attach or noattach)>_<Format (pdf or docx)>_<DialogType (single or multi)>_<IdealDoc Template Category>_<IdealDoc Setting Data Name>
for example: CreateIdealDoc_attach_pdf_single_Invoice_prod
The IdealDoc Template Category (“Invoice” in this example) will be used to show only the IdealDoc Templates with Category equals to “Invoice” for selection. If no template filter should be applied the term “any” can be used as category. E.g. CreateIdealDoc_single_any_prod
The IdealDoc setting name (“prod” in this example) is used to query the IdealDoc Setting record with this name for connecting to the IdealDoc service.
After creating the quick action it needs to be added to the specific lightning page:
Once added to the lightning record page the action button can be used to create the IdealDoc document:
...