1. You can also include the related list fields from child object(s) into the Template . Please note that the related lists may be represented only within tables so the rows can repeat with multiple values.
    1. You can make border of table invisible if you don’t want it to look like a table by making the font white for table lining format. See this Google article for more detail on how to format tables.
    2. You can only merge related fields from one child object in each table. If you would like to merge from multiple child objects on your template, you will need to separate the tables (can inset a table within a table).
  2. Select Base Object. The menu will appear with all child objects that are related to the master object.
    1. In the screenshot below we want to show Opportunity Line Items in a table. So we will be selecting Opportunity as a master object and Opportunity Line Item as a child object.
  3. Select Child Object and pick the field you wish to merge from the list of fields.
    1. If you are having issues with your related list field not merging a value on the document, see this article for more detail.
  4. You can set a Filter and/or Sorting option for the entire table by adding it once to any of the fields you’re merging into the table:
    1. Apply Filter: You may want to filter on some of your related list items based on some condition or validation. For example, you may only want to merge products from a certain product family. Select the related list field, see it populate under Merge Field Code, then select a dropdown option from Apply Filter. Make sure you manually write what the filter is next the equals (=) symbol and the merge field will update to your filter specification and you can merge that updated field into template. So for this filter example, the Filter would be it would be “Product Family = Winter Pricing” with final merge code of  {!Opportunity.r.OpportunityLineItems.Product_Family__c[Product_Family__c=”Winter Pricing”]}.
      1. If you are looking to filter on multiple criteria, please see this article for more detail.
    2. Sort By: If you would like to sort your related list items in a certain order, you can use the sort by feature. For example, you could sort by Line Description in Alphabetical order or use the “Sort Order” option which will populate your related list items in the same sort order showing on that specific Salesforce record. Here is an example of using Sort Order option to show Opportunity Products in same Sort Order on Salesforce record:  {!Opportunity.r.OpportunityLineItems.Product2.Name[ORDER BY SortOrder ASC]}
  5. Copy Merge Field Code and paste it into the table on your template.
  6. Click “Go Back” button when your document is ready, all changes are automatically saved in your Google Doc.
    RS Documents Revised Documentation (1)