Sage CRM 2020 R1: Extended support for Nested Mail Merge – Part 1

By | April 13, 2020

Sage CRM always had the capability to allow the users to create mail merge documents using the concept of nested mail merge. Now with the release of SageCRM 2020 R1, this feature of Sage CRM is enhanced further. In earlier versions of Sage CRM, user was able to create nested mail merge template only for Quotes and Orders entity. But now with Sage CRM 2020 R1, users can create nested mail merge template for other entities like company, person, cases, opportunity and communication.

New Stuff: Converting JavaScript date to Sage CRM date

In this blog, we will explain you how to enable nested mail merge in Sage CRM. Since the nested mail merge relationship is defined in MailMergeRelatedInfo table; user need to insert a new record in MailMergeRelatedInfo table. In below example, we will be using Company and Cases entity. So that, user can create a definition to nest a list of all cases under a company.

First create a view of the fields (Case entity in my example) you would require to merge data of. We can also use the standard views available. Below are the parameters considered to create a nested mail merge template –

  1. mmri_EntityName: Company
  2. mmri_ChildEntity: Cases
  3. mmri_ChildView: vListCases
  4. mmri_LinkColumn: Case_PrimaryCompanyId

The EntityName is the parent entity.  This is the outer table to be used.  In my example, it is ‘Company’.

The ChildEnity is the child entity.  This is the inner table to be used while creating template.  In other words, this is the ‘nested’ table in the nested mail merge.

Child View is the view to be used that joins child entity to the parent entity.  LinkColumn is the key on the child entity that defines the relationship to the parent. Case_PrimaryCompanyId joins a child case to its parent company.

There is no user interface provided in Sage CRM 2020 R1 to insert the data into the MailMergeRelatedInfo table. So here we have inserted record into the MailMergeRelatedInfo table at Database level i.e. SQL studio management. You can refer the below screen shot for SQL query to execute into the SQL studio management.

Insert Query for MailMergeRelatedInfo table
Insert Query for MailMergeRelatedInfo table

In this way you can easily enable the nested mail merge for other entities. There are some limitations while enabling nested mail merge. You are limited to one Child set of data per entity. For example, if you have linked Company with Cases, you should not then link Company with Opportunities.​ Also, you must not delete or change the existing default definitions.

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.

Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3Sage IntacctSage 100Sage 500 and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like  Greytrix Business ManagerSage CRM Project ManagerSage CRM Resource PlannerSage CRM Contract ManagerSage CRM Event ManagerSage CRM Budget PlannerGmail IntegrationSage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our integration solutions, please contact us at We will be glad to assist you.