jbutz
1/31/2014 - 9:08 PM

ServiceNow - Workflow E-Mails

ServiceNow - Workflow E-Mails

<mail_script>
var item_var = function(key)
{
	template.print( current.variables[key].getGlideObject().getDisplayValue() );
}
</mail_script>

... blah blah blah ...
<strong>Variable One:</strong><mail_script>item_var('var1')</mail_script>
<strong>Variable Two:</strong><mail_script>item_var('var2')</mail_script>
<strong>Variable Three:</strong><mail_script>item_var('var3')</mail_script>
...
<mail_script>
template.print( current.variables['primary_contact'].getGlideObject().getDisplayValue() );
</mail_script>
current.variables['variable_name'].getGlideObject().getDisplayValue(); // For the displayed value
current.variables['variable_name'].getGlideObject().getValue(); // For the real value (sys_id when it is a reference)