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

Binding varibale for service account owner in Task discontinue email tempalte

Ramesh
New Contributor
New Contributor

Hi Team,

Created email template in the service account end point for task discontinue scenario. But we are unable to trigger email to the owner and same email trigger to the requestor.

To field: 

Query 1:

{if('Service Account'.equals(task?.accountKey?.accounttype)){ def res = ''; task?.requestAccessKey?.collect{ it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('USEROWNERKEY')}.collect{it.attributeValue}.join('###')}?.get(0)?.split(',')?.eachWithIndex{ num, idx -> res = res + com.saviynt.ecm.identitywarehouse.domain.Users.get(num)?.email + ',';}; return res; } else{return user?.email}}

Query 2:

if {task.accountKey?.accounttype?.equalsIgnoreCase('Service Account')?accountOwners.collect{it.email}.join(,):user.email}

Tried with the below to get the binding varibales available but not getting any thing related to service account owner.
{this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}

Regards,

Ramesh

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

To get what variables are present to use in the email template, check using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:


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

 

please share output


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

Hi Rushikesh,

Thanks for the update.

As per my initial conversion I tried with the mentioned binding variables, but we didn't get the account details and owner details.

Regards,

Ramesh

 

 

Please share output of code shared 


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