and more in a single search tool across platforms. Read the announcement here. |
02/28/2024 02:24 PM
Hello,
When an enterprise role is approved, we aim to send an email to the user, informing them that the role will be provisioned within a few hours. We have a requirement to send emails only for approved role requests that have a custom property populated. I have attempted to implement the following logic in the 'To:' field within the email template utilized in the workflow, but it doesn't seem to be functioning correctly. Could you please review the syntax provided below and offer any insights? Your assistance would be greatly appreciated.
${if(role.customproperty22?.equalsIgnoreCase('SENDMAIL')){users?.email}}
Solved! Go to Solution.
02/28/2024 04:15 PM
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" + ">"}}
02/28/2024 06:17 PM - edited 02/28/2024 06:17 PM
@ewalton try below
<% if(role.customproperty22.equalsIgnoreCase('SENDMAIL') print "${user.email}"%>
03/04/2024 09:11 AM
Thank you for your assistance!
03/04/2024 09:12 AM
Thank you!
02/28/2024 07:10 PM
Use below
<% if(tasks?.assignedFromRoles?.customproperty22?.equalsIgnoreCase('SENDMAIL') print "${user.email}"%>