Mail Merge with Collection Builder

The Mail Merge Record Collection Action Builder retrieves records that match a Criteria and merges those records with a mail merge template.

media_1483689597511.png

Select the record type that will be merged with the template.

media_1481653248456-1.png

The Record Criteria will be used to ascertain which records to retrieve from the database.

media_1481653308160-1.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be statename.

Parameters will have the value substituted during the script execution.

media_1481653338047-1.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481653369444-1.png

media_1481643190176-2.png

Select the Document Object Type that will contain your template.

media_1481643322085-2.png

The Template Criteria will be used to ascertain what document to be retrieved.

media_1481643368137-2.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be documentName.

Parameters will have the value substituted during the script execution.

media_1481643483651-2.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481643494728-2.png

media_1481643537754-2.png

Click Yes to save the document as a Pdf.

File Path – the variable that will hold the path to the new document file. Note: this variable needs to be set before this point in the script.

Deleting the File Path variable name will bypass the saving file portion of the script.

media_1481643583941-2.png

Selecting Yes will send the document contents to the default printer.

Created Script

media_1481654326380.png

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with.

Get Records – retrieves the records, in the database, that matches a Criteria and sets that record to a variable.

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with. This parameter is for the document template.

Find Record By Criteria – retrieves the template record, in the database, that matches a Criteria and sets that record to a variable.

media_1481654352375.png

Get Record Content – gets the document content from the record.

New Document Item – creates a new DocumentItem and sets that to a variable.

Set DocumentItem Content – sets the newly created DocumentItem content to the record content variable.

Document Mail Merge – generates the template mail merge using all records retrieved.

media_1481654367392.png

Save Pdf File – takes a path and saves the final mail merge contents to that path.

Print Document – sends the final mail merge content to the default printer.

Tutorial

Mail Merge with Record Loop Builder

The Mail Merge Loop Action Builder retrieves a group of records, loops through each record and merges that record with a mail merge template.

media_1483689627094.png

Select the record type that will be merged with the template.

media_1481653248456.png

The Record Criteria will be used to ascertain which records to retrieve from the database.

media_1481653308160.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be statename.

Parameters will have the value substituted during the script execution.

media_1481653338047.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481653369444.png

media_1481643190176-1.png

Select the Document Object Type that will contain your template.

media_1481643322085-1.png

The Template Criteria will be used to ascertain what document to be retrieved.

media_1481643368137-1.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be documentName.

Parameters will have the value substituted during the script execution.

media_1481643483651-1.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481643494728-1.png

media_1481643537754-1.png

Click Yes to save the document as a Pdf.

File Path – the variable that will hold the path to the new document file. Note: this variable needs to be set before this point in the script.

Deleting the File Path variable name will bypass the saving file portion of the script.

media_1481643583941-1.png

Selecting Yes will send the document contents to the default printer.

Created Script

media_1481653496786.png

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with.

Find Record By Criteria – retrieves the template record, in the database, that matches a Criteria and sets that record to a variable.

Get Record Content – gets the document content from the record.

New Document Item – creates a new DocumentItem and sets that to a variable.

media_1481653536226.png

Set DocumentItem Content – sets the newly created DocumentItem content to the record content variable.

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with. This parameter is for the records.

Get Records – retrieves all records that match the Criteria.

media_1481653565042.png

Loop Record Collection – loops through all the records that were retrieved.

Document Record Mail Merge – generates the mail merge record with template.

Save Pdf File – takes a path and saves the final mail merge contents to that path.

Print Document – sends the final mail merge content to the default printer.

Mail Merge with Record Builder

The Mail Merge Record Action Builder retrieves a mail merge template from the database and merges with one record.

media_1483689646419.png

Select the record type that will be merged with the template.

media_1481643145539.png

Choose the variable that will contain the record id to be merged.

media_1481643190176.png

Select the Document Object Type that will contain your template.

media_1481643322085.png

The Template Criteria will be used to ascertain what document to be retrieved.

media_1481643368137.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be documentName.

Parameters will have the value substituted during the script execution.

media_1481643483651.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481643494728.png

media_1481643537754.png

Click Yes to save the document as a Pdf.

File Path – the variable that will hold the path to the new document file. Note: this variable needs to be set before this point in the script.

Deleting the File Path variable name will bypass the saving file portion of the script.

media_1481643583941.png

Selecting Yes will send the document contents to the default printer.

Created Script

media_1481643688435.png

Get Record Data – retrieves a record, from the database, using the ID.

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with.

Find Record By Criteria – retrieves the first record, in the database, that matches a Criteria and sets that record to a variable.

Get Record Content – gets the document content from the record.

media_1481643726695.png

New Document Item – creates a new DocumentItem and sets that to a variable.

Set DocumentItem Content – sets the newly created DocumentItem content to the record content variable.

Document Record Mail Merge – generates the mail merge record with template.

Save Document File – takes a path and saves the final mail merge contents to that path.

Print Document – sends the final mail merge content to the default printer.

Save Document to File Builder

The Save Document to File Action builder retrieves a document form the database and saves it to a local directory.

media_1481641731971.png

Select the Document Object Type that will be retrieved.

Click the arrow on the right to select from a list of object types.

Click next once one is selected.

media_1481641772062.png

The Document Criteria will be used to ascertain what document to be retrieved.

media_1481641806486.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be documentName.

Parameters will have the value substituted during the script execution.

media_1481641885235.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481641905116.png

media_1481641952711.png

Click Yes to save the document as a Pdf.

File Path – the variable that will hold the path to the new document file. Note: this variable needs to be set before this point in the script.

Created Script

media_1481642029351.png

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with.

Find Record By Criteria – retrieves the first record, in the database, that matches a Criteria and sets that record to a variable.

Get Record Content – retrieves the document content from the record and places it into a variable.

 

media_1481642053996.png

New Document Item – creates a new DocumentItem and sets that to a variable.

Set DocumentItem Content – sets the newly created DocumentItem content to the record content variable.

Save Document File – takes a path and saves the document contents using that path.

Update Document from File Builder

The Update Document from File will retrieve a document record by ID and store the contents into a DocumentItem.

All specified properties will also be stored into variables.

media_1481640412152.png

Select the Business Object Type that will be updated.

Click the arrow on the right to select from a list of object types.

Click next once one is selected.

media_1481640485675.png

The Document Criteria will be used to ascertain what document to be retrieved.

media_1481640508013.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be documentName.

Parameters will have the value substituted during the script execution.

media_1481640534099.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481640556539.png

media_1481640580633.png

Select the properties, of the object type, that will be set.

Select the Property.

Type in a Variable name or select from a list of existing Variables that will hold the value of the property.

Click the Plus button to add that property to the list to be retrieved.

Click Finish once all property values have to be retrieved have been added.

Note: All property variables will need to be set prior to running this portion of the script.

media_1481641048000.png

The variable that will hold the path to the document file.

You can type in any variable name or select existing variables from the drop down.

Note: this variable will need to be set to the actual path prior to portion of the script.

Created Script

media_1481641081168.png

New Document Item – creates a new DocumentItem that will be used in loading the file. Imagine the DocumentItem as your wordprocessor application.

Load Document File – this takes the DocumentFile and passes the path to the local file to be loaded.

Get DocumentItem Content – retrieve the Rtf content of the document file and set it to a variable.

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with.

media_1481641100895.png

Find Record By Criteria – retrieves the first record, in the database, that matches a Criteria and sets that record to a variable.

Set DocumentName – this sets the Property to the value of a variable. There will be a Set Property action for each property that was added. Note: these variables will need to be set prior to this portion of the script.

Set Record Content – sets the record content to the variable that holds the DocumentItem content.

Commit All Changes – saves all changes to the database.

Tutorial

Get Document from Database Builder

The Get Document from the Database will retrieve a document record by ID and store the contents into a DocumentItem.

All specified properties will also be stored into variables.

media_1481566824301.png

Select the Business Object Type that will be retrieved.

Click the arrow on the right to select from a list of object types.

Click next once one is selected.

media_1481568392796.png

The Document Criteria will be used to ascertain what document to be retrieved.

media_1481631729918.png

Values can be passed into Criteria by creating a parameter.

By enclosing a value in { } brackets, that flags the word as a parameter. The name of the parameter, in the picture, would be documentName.

Parameters will have the value substituted during the script execution.

media_1481568414003.png

If parameters are found in the Criteria, they wil be listed in the Name drop down.

Name – the name of the parameter within the criteria.

Type – type of value to be expected (String, Bool, Date, Decimal, Number).

Variable – the variable that will hold the value. The drop down will contain existing variables or type in a new variable name.

Click the Add button to add the parameter name and value to be substituted.

media_1481568429642.png

media_1481631892047.png

Select the properties, of the object type, that will be retrieved.

Select the Property.

Type in a Variable name or select from a list of existing Variables that will hold the value of the property.

Click the Plus button to add that property to the list to be retrieved.

Click Finish once all property values have to be retrieved have been added.

Note: All property variables will need to be set prior to running this portion of the script.

media_1481568497898.png

Selecting Yes will send the document contents to the default printer.

Created Script

media_1481632070981.png

Add Text Criteria Parameter – maps a Criteria Parameter to a value to be substituted with.

Find Record By Criteria – retrieves the first record, in the database, that matches a Criteria and sets that record to a variable.

Get Property (Get DocumentName) – this retrieves the value of the property and puts that value into a variable. There will be a Get Property action for each property that was added.

media_1481632099033.png

Get Record Content – retrieves the document content from the record and places it into a variable.

New Document Item – creates a new DocumentItem and sets that to a variable.

Set DocumentItem Content – sets the newly created DocumentItem content to the record content variable.

Print Document – prints the content from the DocumentItem.

Tutorial

New Document from File Builder

This New Document from File Action Builder will load a document file from the hard drive and create a record to store the contents of the document into the database.

media_1481566593804.png

Select the Business Object Type that will be created.

Click the arrow on the right to select from a list of object types.

Click next once one is selected.

media_1481627868804.png

Select the properties, of the object type, that will be set.

Select the Property.

Type in a Variable name or select from a list of existing Variables that will hold the value of the property.

Click the Plus button to add that property to the list to be retrieved.

Click Finish once all property values have to be retrieved have been added.

Note: All property variables will need to be set prior to this portion of the script.

media_1481566655821.png

The variable that will hold the path to the document file.

You can type in any variable name or select existing variables from the drop down.

Note: this variable will need to be set to the actual path prior to portion of the script.

Created Script

media_1481566682890.png

New Document Item – creates a new DocumentItem that will be used in loading the file. Imagine the DocumentItem as your wordprocessor application.

Load Document File – this takes the DocumentFile and passes the path to the local file to be loaded.

New Document Record – this will create a new database record to which the contents of the file will be set.

Set Document Name – this sets the Property to the value of a variable. There will be a Set Property action for each property that was added. Note: these variables will need to be set prior to this portion of the script.

media_1481631197508.png

Get DocumentItem Content – gets the document content and places it into a variable.

Set Record Content – takes the content from the variable and sets it to the record content property.

Commit Changes – saves all changes to the database.

Overview of Builders

media_1481546960942.png

Action Builders are step by step wizards that help you build scripts quickly.

Click on the Action Builder and the Action Builder Wizard will pop up.

Append Text to Document

media_1449518681680.png

Appends TEXT content to the end of the document.

Click the Click for Options link to bring up the Options dialog.

media_1449518690589.png

Document – the DocumentItem being used
Value – the TEXT content to be appended.

Append Html to Document

media_1449518643496.png

Appends HTML content to the end of the document.

Click the Click for Options link to bring up the Options dialog.

media_1449518653673.png

Document – the DocumentItem being used.
Value – the HTML content that will be appended.