Use cross-object formulas to display parent/reference object fields in merge fields

Cross-object formulas to display parent/reference object fields can be used for merge fields in Office File Creator.

*This function is a feature of Office File Creator ver.2. In ver.1, create a cross-object formula field in the target object and set the created field as the merge field.

 

About Cross-object formulas

A Cross-object formula is the formula that displays the fields of the referenced object when the object has lookup fields.

 

For example, the Opportunity object has an Account lookup field. If you want to display the Billing State/Province of the Opportunity record screen, the cross-object formula is "Account.BillingState".

 

 

Cross-Object Formula Format

  • A cross-object formula is "referenced field name. Referenced object field name".
  • From child to parent, reference fields are connected by ". from child to parent and back up. For three or more levels, the relationship is traced from the bottom up: child, child, child, ... parent, and so on.
  • From child to parent, reference fields are connected by ". to parent and follow upward.
  • If the reference field is a standard field, it is traced up excluding the Id at the end of the reference field name.
  • If the reference field is a custom field, change "__c" at the end of the reference field name to "__r" and trace up.
  • In Office File Creator, Up to 5 levels higher object fields can be used for merge fields.

 

 

Example: Reference field is a standard field

Display the BillingState field of Account from Opportunity

Cross-object formula: Account.BillingState

 

Example: Reference field is a custom field (1)

Display the BillingState field of Account__c from Opportunity

Cross-object formula: Account__r.BillingState

 

Example: Reference field is a custom field (2)

Display the Name field of Customer__c from BillingDetail__c

Cross-object formula: Bill__r.Customer__r.Name

 

 

Merge Fields Settings

The format of the merge filed is as follows.

{!Object API Name.Cross-object formula}

 

Example1. BillingState field of Account of Opportunity

{!Opportunity.Account.BillingState}

 

Example2. Email field of Owner of Opportunity

{!Opportunity.Owner.Email}

 

Example3. DeliveryLocation field of Customer__c of Bill__c of BillingDetail__c

{!BillingDetail__c.Bill__r.Customer__r.DeliveryLocation__c}

 

Memo

The field whose data type is address, such as the Billing Address of the Account object, is a compound field consisting of state, city, street, etc. In cross-object formulas, it is necessary to get the BillingState, BillingCity, etc. separately.

For more information on address compound fields, please refer to the Salesforce guide.

Account

Address Compound Fields

 

 

(Reference) Cross object formula creation screen

Cross-object formulas can be viewed on the screen of creating the formula field of the object.

 

 

Copied title and URL