Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Error while sending Email to endpoint owners

MaxJ
New Contributor
New Contributor

i need some assistance.
Whenever the task is assigned, every owner of the endpoint should get an email. Endpoint owner is set to a user group with 4 members.(picture "workflow")

What is the best way to get the email adresses of the owners?

We tried ${task?.endpoint?.getOwnersEmail()} There is an email being generated, but it cant discover the right users. This is the error message to be seen on the emailhistory-job:

Error - No such property: task for class: SimpleTemplateScript1400 Possible solutions: class trying to evaluate the to email address for ID - 21 - assigning admin user
Error - No such property: task for class: SimpleTemplateScript1400 Possible solutions: class trying to evaluate the to email address for ID - 19 - assigning admin user
Error - No such property: task for class: SimpleTemplateScript1400 Possible solutions: class trying to evaluate the to email address for ID - 18 - assigning admin user
Error - No such property: task for class: SimpleTemplateScript1400 Possible solutions: class trying to evaluate the to email address for ID - 20 - assigning admin user
Error - No such property: task for class: SimpleTemplateScript1400 Possible solutions: class trying to evaluate the to email address for ID - 22 - assigning admin user
Duplicate Record for ID - 20 for email [*admin-email*]
Duplicate Record for ID - 21 for email [*admin-email*]
Duplicate Record for ID - 22 for email [*admin-email*]
Time Taken 1795(miliseconds)

 

2 REPLIES 2

CR
Regular Contributor III
Regular Contributor III

try below

${task?.endpoint?.ownerkey}

or

{task?.endpoints?.ownerkey}


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star

Please share 

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


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.