Merge Letter Templates

Version: 1.1
Release Date: November 21, 2015
Author: Matthew Leering

MergeLetterTemplates

 

In short, this is a module that will allow developers to define merge letter variables which can be inserted into merge letter templates that users are able to create. It uses a single table that serves double duty as both storage for template data, and also for handling the virtual list of merge letter variables.  I’ve tried to make this as easy to integrate as possible, so hopefully your experience with this module is a good one.

 

Version 1.1 Updates Include:

  • Updated Readme (Reference to Configuration script was mis-labeled, another step wasn’t verbose enough in its explanation) –> Thanks Mike!
  • Fixed bug with Configuration script –> incorrect layout name was hardcoded
  • Updated how variables get dynamically created
  • Introduced new way of using get variables that evaluate at runtime –> Use {{GetFunctionName}} syntax similar to merge functions used on layouts
  • Allowed for the usage of string literals as substitution text –> Can also have system generate these strings onInitializeModule (not necessarily runtime)
  • Updated configuration to show examples of all 3 types of substitution values (fields/strings/GetFunctions)

 

 

How To Install

  1. Copy “ModularMergeLetterVariables” Table to your solution
  2. Reset auto-enter serial to 1
  3. Recreate Relationship to the “ModularMergeVariables_Self” table
  4. Copy Scripts To Your Solution
  5. Copy All Layout Objects From “ModularMergeLetterVariables” Layout Into the “ModularMergeLetterVariables” Layout That Should Have Been Automatically Created In Your System
  6. Modify “Configuration” script so that it will point to the correct layout
  7. Make sure the “Initialize Module” script gets called prior to running the “Return Merged Text” script. (I opted to run the “Initialize Module” onFirstWindowOpen for the purpose of this demo)
  8. *Optional* You Might Want To Create A Value List Like The One That Exists In This Demo File

How To Implement

  1. Perform Script “Return Merged Text” passing your templateContent as a parameter.
  2. Bring the user to a layout that displays the results of the “MERGEDTEXT” field in a letter-style layout

 

Download Merge Letter Templates