Notification definitions

HTML email notifications are also defined in notification records. However, instead of referencing a plain-text message or a predefined format, each HTML email notification record always references a message record with an msg class of HTMLTemp and an id of 1. This message record is only a wrapper. The actual message body and subject are generated by a jscall expression in the Arguments field that returns HTML text by evaluating the corresponding HTML template.

The Arguments expression for the message body calls the getMailBody function to obtain the body HTML code, and the Arguments expression for the message subject calls the getMailHeader function to obtain the subject HTML code. The template name and the record that triggers the notification are passed in as arguments.

Below is an example for notification ChM Change Approval:

The Message tab

Field Value
Msg Class HTMLTemplate
Msg No. 1
Arguments jscall( "htmlemailtemplates.getMailBody", "ChM Change Approval Approved", $L.file, $L.file.save, requested.by in $L.file)
Condition category in $L.file~="Subscription"
Notify Method email
Recipient(s) requested.by in $L.file

The Email/Mail Subject Line tab

Field Value
Msg Class HTMLTemplate
Msg No. 1
Arguments jscall( "htmlemailtemplates.getMailHeader", "ChM Change Approval Approved", $L.file, $L.file.save, requested.by in $L.file)