Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

If condition in email Template not working

agupta1
New Contributor III
New Contributor III

Hi,

We have an endpoint email template configured for "new account" task(user is created via user form and during account creation we are triggering this template from new account task) which has an "if" condition in the "CC" field which says-"<% if (user?.location == 'X') print '${requestor.email}' else print 'XYZ@test.com' %>"

This is triggering correct for else condition but for if condition it is not accepting "requestor.email" and hence no email is getting triggered. we also have other endpoint templates that has the same binding variable and that works but this isn't working for this scenario. Can anyone please help me on this ??

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Run below code in email body and validate if requestor variable exposed or not

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}

 

for testing remove if else condition 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Please find the snippet, requestor is exposed which shows as adminad_email.JPG

Does ${requestor?.email} returns results in email body


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.