Template Common Settings

Create a template file in the same file format as the output file format, either Excel (.xlsx, .xlsm), Word (.docx, .docm), or PowerPoint (.pptx, .pptm). For PDF and HTML output, create the template file in Word (.docx). The fields of the master object and related child objects can be used as the merge fields.

Master Object Merge Fields

Set the merge fields in the template file in the following format.

Merge Fields Format

{!Object Name.Field Name}

 

Example

{!Opportunity.Name} *Standard object.Standard field

{!Bill__c.IssueDate__c} *Custom object.Custom field

 

Child Object Merge Fields

For the merge fields of the child object, enter only one line. The number of lines is output according to the number of child records. If the reference field is a custom field, append "__r" at the end of the child relationship name.

Merge Fields (2 Levels)

Merge Fields Format

{!Child Relationship Name.Field Name}

 

Example

{!OpportunityLineItems.Name} *Standard parent reference field.Standard field

{!BillDetails__r.IssueDate__c} *Custom parent reference field.Custom field

 

How to check the child relationship name

  1. Go to the Object Manager and check the list of fields of the corresponding child object.
  2. Click on the field name of the master object's reference field in the child object's field list.
  3. The content displayed in the child relationship name in the field's setting information is the child relationship name. At this time, if the parent object's reference field is a custom field, the child relationship name will be the one with "__r" appended to the end of the displayed child relationship name.

 

Sequential Numbers

To output sequential numbers of child records, enter {!number()}. Sequential numbers starting from 1 are output.

 

Layout Options for Child Record

Layouts other than one record per line, such as multiple lines per child record, are possible. The options are available in OFC Pro.

Option Layout
Output by Index Numbers of Child Record Output by specifying the index number of the child record. It allows any layout, such as outputting multiple lines per child record and columnar output.
Block Output of Child Records Output in a multi-line layout per record.
Group Output of Child Records Output child records by grouping the field values.
Output Fixed Number of Rows for Child Records Output a fixed number of rows regardless of the number of records.

 

Package Object Merge Fields

For package objects, prefix with namespace prefix + "__".

Master Object Merge Fields

Merge Fields Format

{!Namespace Prefix__Object Name.Field Name}

 

Example

The package namespace prefix is "BillingMaster" and the object name is "BM_Bills__c".

{!BillingMaster__BM_Bills__c.Name}

 

Child Object Merge Fields

Merge Fields Format

{!Namespace Prefix__Child Relationship Name.Field Name}

 

Example

The package namespace prefix is "BillingMaster" and the child relationship name is "BM_BillDetail_Bills".

{!BillingMaster__BM_BillDetail_Bills__r.Name}

 

Field Values

Data Type Description
Lookup/Master-Detail
  • Reference fields can be output either Id or Name field. To output Name field, check the "Output Name Not Id For Reference Field" checkbox in the OFC_Template record.
  • For outputting fields of reference objects, refer to Output Reference Object (Parent) Field.
Date Excel: Serial values are output.

Word/PowerPoint/PDF: The output is in the format on the Salesforce record screen.

For formatting, refer to Formatting of Date and Date/Time Fields.

Date/Time Excel: Serial values are output.

Word/PowerPoint/PDF: The output is in the format on the Salesforce record screen.

For formatting, refer to Formatting of Date and Date/Time Fields.

Currency Currency symbols are not output.

For formatting, refer to Formatting of Currency and Number Fields.

For Ver.1, refer to Formatting of Currency and Number Fields (Ver.1).

Number For formatting, refer to Formatting of Currency and Number Fields.

For Ver.1, refer to Formatting of Currency and Number Fields (Ver.1).

Picklist The API name is output. To display a value, use the ToLabel() function for the merge field.

Functions for Merge Fields

Rich Text Area
  • Rich Text Area field values are output with Html tagged values stored in Salesforce. The output cannot be formatted as it is displayed on the record screen. The values stored in Salesforce should be checked in the Developer Console or Dataloader.
  • For outputting images of Rich Text Area fields, refer to Output Images.
Text (Encrypted) The masked value is output, the same as what is displayed to the user on the record detail page.

 

Users who do not have permission to read the field

If the user who outputs files does not have reference permission to the merge field, the merge field will be output blank.

 

Decimal Point Considerations

Some standard fields, such as Opportunity Amount and Quote Amount, may have decimal points stored in Salesforce even if the decimal point is not displayed on the record screen. For example, if Opportunity Quantity contains a decimal point, Amount is stored with a decimal point even though the data type of Amount is "Currency (16, 0)". The values stored in Salesforce should be checked in the Developer Console or Dataloader.

 

Office Features

In principle, Office features are outside the scope of support. Some Office features are available, but not all templates are supported. Please check your actual templates and output in the Sandbox.

Available Office Features

File Type Details
Excel Excel Formulas, Data Validation, Conditional Formatting, Table and Shapes are available.
Word Table, Text Box, Watermark, Shapes and Field Codes are available.
PowerPoint Table, Text Box and Shapes are available.
PDF Table is available.

*Text Box, Watermark, Shapes and Field Codes are not available.

*Tables are for layout only, excluding aggregate functions.

 

Consideration・Limitations

  • Not all layouts and output patterns are supported. Complex layouts are not supported.
  • Formulas cannot be used such as {!If(xxxxx)} for the merge field.
  • Template file size should not exceed 1 MB. If the file contains a large amount of text or images, even within 1 MB, the file will fail to output. The Office file consists of multiple XML files, compressed in a ZIP file, and the file size limit before compression is 4 MB.
  • Template files should be created in the Microsoft Office desktop version. Template files created by other applications, such as online versions, are not supported.
  • Office features are not supported.
  • Images such as company logos can be included in the template file. However, depending on the file size of the image, output may take a long time or result in an output error. In the case of PDF output, the layout may be corrupted. Please check the actual output in a test environment.

 

Reference

Excel

Word

PowerPoint

PDF

HTML

Output Options

How to Find Merge Fields and Child Relationship Names

 

Troubleshooting