Add re-usable MS Word templates, keep documents like product sheets or terms & conditions separately and so much more possibilities.
REMARK: make sure to use DOCUMENT_V3 instead of DOCUMENT_V2
Repeat DocConfigs:
You can automatically add TEMPLATE DocConfigs to the generated document by not specifying a specific TEMPLATE but use a DataSource and a DataSource Field. The DataSource Field must be a Customer DocConfig Id (not the Salesforce Id).
The DOCUMENT_V3 ConfigType will loop over all records in the DataSource and retrieve each TEMPLATE to import it into the resulting document.
A good way to accomplish this, would be to create a Lookup to a DocConfig in Salesforce and via the Lookup use the field “cadmus_core__CustomerDocumentConfigId__c” as this field has the Customer DocConfig Id that is required in this ConfigType.
By default, the header and footer of the MAIN DocConfig are used for the inserted TEMPLATES.
After the last TEMPLATE, there will be no separator added. Also where there are no TEMPLATES to load (empty DataSource or all TEMPLATES are filtered out by the Criteria Logic), no separator is added (There is an exception for “Section break”)
You can select different ways to separate the inserted TEMPLATES:
- Double spacing: this looks like 2 enters are added between the TEMPLATES
- Single spacing: this looks like 1 enter is added between the TEMPLATES
- Page break: each TEMPLATE is added to a new page
- None: directly add the TEMPLATES after each other
- Section break: This is a special case!
- This option will use the header and footer from the TEMPLATE and insert these into the resulting document. To accomplish this, a Section Break must be added between TEMPLATES
- After the last Template, there is a Section Break added! (When there are no TEMPLATES to load, then there is no Section Break added)
- As there is an Section Break added for each TEMPLATE, even the last one, make sure the mergefield for this ConfigType is not in a separate Section! If this is in a separate section, there will be an empty section in the generated document and this can be an empty page.