Opened for name populate in email body

may13
Tera Contributor

I need to create a simple notification email script to display the ‘Opened for’ name in the notification body. The scenario is that I am creating a notification on an HR Task, and I want to show the ‘Opened for’ name from the case associated with this task. 
I tried with Dot walking but it's not working

7 REPLIES 7

@may13 

Thank you for marking my response as helpful.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

abirakundu23
Giga Sage

Hi @may13 ,
This is simple dot walking ${parent.opened_for.name}. I have tried on my PDI and it is working as expected.

abirakundu23_0-1767095962450.png

 


What is the value is showing for opened for field value after previewing the notification?

Please check  correct application scope , correct table name. 

Please mark helpful and correct answer if it's worthy for you.


Juhi Poddar
Kilo Patron
Kilo Patron

Hello @may13 

If you trying to display opened for through email script then try the below script:

template.print(current.parent.opened_for.name);

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar