Advanced relationship settings allow for three levels of child record output, or the same child record in different layouts.
*This feature is available in Office File Creator Pro.
Overview
Examples of Use
- Output child records of 3 or more levels.
- Output a child record detail line of the Opportunity and the total line of the child record.
- Output different layouts for open and closed statuses for cases related to the Account record.
Required settings
- Merge Fields Settings
- OFC_Child Object Option Record Settings
Determine Child Relationship Name
Determine the child relationship name used to link the merge fields to the OFC_Child Object Option record.
Naming Rules for Child Relation Name
Only alphanumeric characters and underscores are allowed, beginning with the Roman alphabet.
Examples of child relationship names
Products1
OpportunityLineItems (When outputting the three-level hierarchy of Account - Opportunity - OpportunityLineItem, the child relationship name "OpportunityLineItems" of the OpportunityLineItem is also available.)
Merge Fields Settings
Set the merge field in the template file in the form of {!ChildRelationName.Field API Name}.
e.g. {!Products1.ProductName}
OFC_Child Object Option Record Settings
Open the OFC_Child Object Option record detail page.
Reference: Create OFC_Child Object Option Record
Name: Enter any name. e.g. Products
Child Relationship Name: Enter the child relationship name. e.g. Products1
Enter the field values in the "(Pro) Advanced Relationship Settings" section.
Normally, child records are retrieved from the child relationship name, but when advanced relationships are set up, child records are retrieved from the entered "Object API Name" and "Master Object Id Field API Name ".
Object API Name: Enter the object API name of the child object. *Not a child relationship name.
Master Object Id Field API Name: Enter the cross-object formula that references the master object Id.
Refer to the following for cross-object formulas.
Use cross-object formulas to display parent/reference object fields in merge fields
Reference
Output records of grandchild objects (3 levels) to documents
Output the total amount of child records using the aggregate function in the merge field
Output different layouts for open and closed cases - Advanced Relationship Settings