Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Email Template is not working

Gopi
New Contributor III
New Contributor III

Hi team,

The below-commented code which is marked as bold only in that portion is not working.

Error is:

Gopi_0-1678725979120.png

Please let me know what I'm missing.

Dear ${assignee.firstname} ${assignee.lastname}<span>,<br><br></span>
<span>The access request below is assigned to you for
approval. Please log in to <b><i>MyITAccess</i></b>
to review the request using this link:<br><br></span><a href="https://ssm-imf.ssmcloud.net/ECM/jbpmworkflowmanagement/viewopenrequests">Click here to view</a><br><br><div>
<b>Request ID : </b>${requestid}<br><br>
<b>Type of approval : </b>Group approval<br><br>

/*** Not working part
<b>Name of Approval Group : </b><% if(entitlement_values.entitlement_value !=[]) print "${entitlement_values.customproperty4}" else if(rolename !=[]) print "${rolename.customproperty4}" else print "" %><br><br>
****/


<b>Access requested : </b><% if(entitlement_values.entitlement_value !=[]) print "${entitlement_values.displayname}" else if(rolename !=[]) print "${rolename}" else print "" %><br><br>Note: if the request does not appear on your list of pending
approvals, then one of your colleagues has already reviewed the request. <br><span><br>For tutorials, quick reference cards, and more information
about <b><i>MyITAccess</i></b> visit <a href="http://workingwithmyitaccess/" target="" rel="">http://WorkingWithMyITAccess</a>.</span> <br><span><br>For questions, please
contact <a target="" rel="">myitaccess-support@imf.org</a></span><br></div><div><br></div>
Sign in to your account

Regards,

Gopi.

 

4 REPLIES 4

sk
All-Star
All-Star

Try below

<b>Name of Approval Group : </b><% if(entitlement_values.size()>0) print "${def res = ''; entitlement_values.join(', ')?.split(',')?.eachWithIndex{ num, idx -> res = res + com.saviynt.ecm.identitywarehouse.domain.Entitlement_values.get(num)?.customproperty4 + ',';}; return res;}" else if(rolename !=null) print "${rolename.customproperty4}" else print "" %>


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Gopi
New Contributor III
New Contributor III

Hi SK,

This code is also not working. I see that same error.

Regards,

Gopi

 

 

Manu269
All-Star
All-Star

Always start checking with supported variable list :


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

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Gopi
New Contributor III
New Contributor III

Hi Manu,

The problem here is I'm not able to fetch the role CP4 value. Up to my knowledge the binding variable for the role is "rolename" correct me if I'm wrong here.

In the below same code, I can fetch the entitlement_values CP4 value but am not able to fetch the role CP4 value. Eventual CP4 value contains User group name

<b>Name of Approval Group : </b><% if(entitlement_values.entitlement_value !=[]) print "${entitlement_values.customproperty4}" else if(rolename !=[]) print "${rolename.customproperty4}" else print "" %><br><br>