Friday, September 14, 2018

Use Formulas on Custom Email Messages Defined on a Send Email Action of a Workflow

A NetSuite user would like his SuiteFlow's Send Email action to send dynamic outbound messages with the use of formulas.
Using the <%= %> tag, one can use formulas for Custom Email Messages. One can use all the SQL Expressions listed on the help documentation for the email. This is applicable on both Email Templates and Custom Email Messages within the Send Email Action of a workflow. Below is a simple example:


The formula above removed the Entity ID and pulled up only the name of the customer and the employee. One can use more complex formulas on the Custom Email Message. An example would be the CASE SQL Expression.
CASE WHEN {customer.custentity_ismarquee_cust}='T' THEN 'Send Special Message' ELSE 'Send Ordinary Message' END

1 comment: