Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/30/2024 06:20 PM - edited 07/30/2024 06:48 PM
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(‘.’,’_’)} %>
Solved! Go to Solution.
07/30/2024 07:46 PM
single quote is word one.
Use below one
${user.systemUserName.replaceAll('.','_')}
07/31/2024 01:12 PM
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.
07/31/2024 02:57 PM
${ new Date().plus(90).format('yyyy-MM-dd')}