Set the merge field in the template file in the following format. 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.
Object | Merge Field |
Master Object | {!Object Name.Field Name} |
Child Object | {!ChildObject Relationship Name.Filed Name} |
Package Object (Master Object) | {!Namespace Prefix__Object Name__c.Field Name} |
Package Object (Child Object) | {!Namespace Prefix__Child Relationship Name__r.Field Name} |
Instruction manual