Previous Topic: CA IdentityMinder Tag ExtensionsNext Topic: <%= %>


<% %>

This tag lets you embed JavaScript for in-line execution into an email template.

You can use any JavaScript object within the embedded JavaScript. You can also call CA IdentityMinder implicit object methods within the embedded JavaScript.

For example, the following code modifies the body of the approval template shown in Custom Email Templates. JavaScript is used to determine if a secondary object is involved in the event (such as an ORGANIZATION object when a USER primary object is added). If there is no secondary object, the text relating to the secondary object is omitted from the message:

Event: <b> <%=_eventContextInformation.getEventName()%> </b><br>
<%=_eventContextInformation.getPrimaryObjectTypeName()%>:
<b><%=_eventContextInformation.getPrimaryObjectName()%></b><br>
<%
var secondaryType =        _eventContextInformation.getSecondaryObjectTypeName();
if (secondaryType != "") {
   template.add("In " + secondaryType + ": ");
   template.add("<b> "+_eventContextInformation.getSecondary
                                   ObjectName()+" </b><br>");
   }
%>
Status: <b>Approved</b>