Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/11/2024 12:56 AM
Hi Everyone,
We have a use case to send email content based on employee type. I have created a basic email with print statement it worked. But When i am actually adding the original content it does not work. Below is the code which worked with basic text. When I am trying to add the original html content attached file for each condition the error comes as . I tried to save the below html code as sperate email template in that i don't receive any error (for employee i copied and pasted in separate email without any condition it worked) . I saved it as separate html file and able to view the content properly
Operation not allowed as you are entering a value that resembles or contains script code
<% if (task?.tasktype == 1 && user?.employeeclass=='Employee')
print "Dear user please find employee details"
else if (task?.tasktype == 1 && user?.employeeclass=='Contractor')
print "Dear user please find contractor details"
else if (task?.tasktype == 3)
print "Dear Access has been approved"
%>
Thanks
09/11/2024 05:56 AM
Did you validated logs. Logs specifies error
09/11/2024 06:10 AM
@rushikeshvartak Yes i checked it. Even we got the email but in body nothing is showing only with subject we got the email.
09/11/2024 06:11 AM
09/11/2024 06:53 AM
Share code which is working in file 1 and other code in file 2 and merge code in file 3 as attachement
09/11/2024 08:45 AM
Here you go.
With the complete code now we are getting the email triggered. We have 2 issue noted in the email triggered.
1. we have are seeing the binding variable are it is. Values are not shown
2. For employee we get the content related to employee (one in if loop) but for contractor we are getting the content for employee added with content for contractors.
Thanks
09/11/2024 08:57 AM
use attached file
09/12/2024 04:19 AM
@rushikeshvartak I have used the code provided still no luck the same is happening.
09/12/2024 08:16 AM
Updated
09/24/2024 02:40 PM
I have same requirement, does it worked for you @sabthamis ?