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 output, create a Word (.docx) format. 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 Field (2 levels)

Merge Fields Format

{!ChildObject Relationship Name.Filed Name}

 

Example

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

{!BillDetails__r.IssueDate__c} *Custom 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 primary objects reference fields in the child objects field list.
  3. The content displayed in the child relationship name in the fields setting information is the child relationship name. At this time, if the parent objects 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. For package objects, prefix with namespace prefix + "__".

 

Sequential numbers

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

 

 

Layout Options for Child Record (OFC Pro)

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

Option Layout
Output by Index Numbers of Child Record Multi-line output per child record per record

columnar output

Block Output of Child Records Multi-line output per child record per record
Group Output of Child Records Grouping by child record fields

 

 

Package Object Merge Fields

For package objects, prefix with namespace prefix + __.

 

Master Object of Package Object Merge Fields

Merge Fields Format

{!Namespace Prefix__Object Name__c.Field Name}

 

Example

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

{!BillingMaster__BM_Bills__c.Name}

 

Child Object of Package Object Merge Fields

Merge Fields Format

{!Namespace Prefix__Child Relationship Name__r.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 Parent and Reference Object 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 reference name of the list value is output.
Rich Text Area
  • Rich Text Area field values are output with Html tagged values stored in Salesforce. The output cannot be formatted as it displays on the record screen. The values stored in Salesforce can be viewed in the Developer Console or Dataloader.
  • For outputting images of Rich text area fields, refer to Output Images.
Text (Encrypted) The masked value will be 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

Office features are not supported. Some Office features are available, but not all templates are supported. Complex patterns are not supported.

 

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.

 

Notes on available Office features

  • Not all templates are supported. Complex patterns are not supported.
  • When opening the file, if the message "We found a problem with some content in 'XXX.xlsx'. Do you want us to try to recover as much as we can?" or other error messages, remove the Office features in the template.
  • Office features are outside the scope of support. Check with your templates and output contents in the Sandbox.

 

 

ConsiderationLimitations

  • 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. Some Office features are available, but not all templates are 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

Output Options.

How to find the merge field and childrelation names

 

 

Troubleshooting