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.

How to bind Systemusername in email Template

Harish_Yara
New Contributor III
New Contributor III

Hi All,

Can anyone please help in  binding systemusername in email template?

@rushikeshvartak 

Thanks,

Harish

10 REPLIES 10

rushikeshvartak
All-Star
All-Star

Which email template?

use below script and share output 

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


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

Email Template for sending end user information to end user there we are storing sAMAccountname in Systemusername filed so wanted to print same in email template.

@rushikeshvartak 

Thanks,

Harish

Yes but where email template is attached ? Global configuration/ workflow etc

${user.systemUserName} should work on high level


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

At end point level we are configuring the email template.

@rushikeshvartak 

For which condition? Add / remove access new acc ?

run above script and share output 


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

It is for New Account task. 

Should I user below Script?? 

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

@rushikeshvartak 

Yes in email body


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

When ${user.systemUserName} this is used in email template getting below error

"Error while sending emailText must not be null java.lang.IllegalArugumentException: Text must not be null "

@rushikeshvartak 

Did you used script?


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

Harish_Yara
New Contributor III
New Contributor III

Hi @rushikeshvartak,

Finally with this syntax ${user.systemUserName} it is working fine. Thank you.

Thanks,

Harish