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" + ">"}}

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

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 

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

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?

Harish_Yara
New Contributor III
New Contributor III

Hi @rushikeshvartak,

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

Thanks,

Harish