Creating merge fields that reference custom fields
You can create merge fields that will reference custom fields in batch emails and batch printing processes. For example, if a NexJ CRM user would like to send a batch email or print a document congratulating contacts or other users with a work anniversary, they can insert a merge field that references a Work Anniversary custom field into their email or document.
Creating a merge field that references a custom field requires two procedures:
Adding custom fields using NexJ Admin Console.
You must create the custom field using NexJ Admin Console, not the Customize workspace. When you add a custom field in NexJ Admin Console, the Reference Name field is displayed, allowing you to note its auto-generated value which you will need to include in the expression when you create the merge field. The Reference Name field is not displayed if you add a custom field on the Customize workspace.
Adding merge fields that reference custom fields.
Adding custom fields using NexJ Admin Console
To add a custom field that will be referenced by a merge field to the system:
In NexJ Admin Console, navigate to the Entity Codes page.
In the Custom Field Types tab, select Custom Field Types.
Click the Addbutton and select a custom field type to define values that the field accepts:
Text Accepts text values.
Number Accepts numerical values.
Currency Accepts and formats numerical values using the currency defined when the field is created.
Convertible Currency Accepts and formats numerical values into the currency selected by users in NexJ CRM.
Date Accepts and formats date values. Users can type a date value or select a date value from a calendar.
Relationship Accepts an entity as a value and defines it as a relationship in the contact's hierarchy.
In the Add Custom Field dialog, in the Details tab, fill in the following information:
In the Namefield, enter a display name for the custom field.
[Optional] In theDescriptionfield, enter a description of the custom field.
In theGroupfield, select a custom field group to define the custom field tab in which the custom field is available on theContactsworkspace.
Note the auto-generated value in the Reference Name field.
You need to include the auto-generated Reference Name in the expression when you create a merge field that references this custom field.
In the Entity Types tab, assign Entity Types to the custom field.
In the Security tab, you can change the view and edit security levels for this custom field to:
Public Allow all users to view and edit the custom field.
Group Allow only a group of users to view and edit the custom field.
Private Allow only you to view and edit the custom field.
You cannot modify view and edit security levels for the custom field after it has been created. If you want to restrict view or edit access to this custom field, you must set it now. The default view and edit settings are Public.
ClickOK.
The custom field is added to the system. Users can now add the custom field to a contact by following the instructions for Adding custom fields to contacts in the end user documentation.
To add a merge field that references a custom field to the system:
Ensure the Birthday Mailer system preference is enabled.
In NexJ Admin Console, navigate to the Document Codes page.
In the Merge Fields tab, click the Add button .
In the Add Merge Field dialog, complete the following fields as appropriate:
Token Name Specifies the placeholder name for the merge field. This should be a meaningful indication of what information is populated.
Description Provides a brief description of the merge field's intended content.
Category Specifies the subject area that the merge field is applicable to.
Expression Provides a calculated code value that defines the merge field and determines what data is populated from the database.
Syntax: The syntax for an expression that references a custom field is ${customFields[<Reference_Name>] <attribute of custom field>}, in which <Reference_Name> is the auto-generated value in the Reference Name field, in the Add Custom Field dialog, when you add a custom field to the system. For Relationship custom fields, the expression syntax is ${customFields[<Reference_Name>] entityValue <attribute of entity class>}.
Examples of expressions for each custom field type:
For more information on expression requirements, see Merge field expressions in the development documentation.
Custom Token Maps a third-party mailer template token to a NexJ CRM merge field for batch printing.
TheCustom Token field is only available if you have enabled the Birthday Mailer feature.
Click OK.
The merge field is added to the system and available for use. Users can now insert the merge field in the body of an email or add it to a Microsoft Word document.