Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Possible to dynamically build hyperlink in Task Completion email template?

jralexander137
Regular Contributor
Regular Contributor

Hi, I am wondering if there is some way to dynamically build a working hyperlink in an email template. For instance, I have a url similar to https://test.com/personal/<modifiedSystemUserName>_test_com

 

I need to replace all period in the systemUserName of a given user with underscores and then construct the above string to make a working hyperlink in a Task Completion email template. Any suggestions on how to accomplish this? I keep getting the error "Operation not allowed as you are entering a value that resembles or contains script code" when trying different configs.

Some things I have tried

<% print "${user.systemUserName.replaceAll(‘.’,’_’)}" %>

${user.systemUserName.replaceAll(‘.’,’_’)}

<% ${user.systemUserName.replaceAll(‘.’,’_’)} %>

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

single quote is word one.

Use below one

${user.systemUserName.replaceAll('.','_')}

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

That worked, do you have any suggestions on how to add 90 days to currentDate in an email template?

 IT new hire notification Request for ${user?.firstname} ${user?.lastname} - <%= new java.text.SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date()) %>

Looks to pull today's date but I have not been able to figure out how to add 90 days to it.

${ new Date().plus(90).format('yyyy-MM-dd')}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.