Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

OlaN
Tera Sage

Hi,

This should be fairly easy. 

When I tried it was just a single dotwalk from HR task to the parent HR case.

Like this: ${parent.opened_for.name}
Got me the name.

What did you try? Please share more details.

may13
Tera Contributor

@OlaN  i tried with same dot walk but its not working 

And I also tried a mail script, not very complicated either.

Simply put this line in the script:

template.print(current.parent.opened_for.name.toString());
 
And in the notification, I called the script like so:
${mail_script:name_of_my_mail_script}

Ankur Bawiskar
Tera Patron

@may13 

dot walking should work fine

are you dot walking correct field?

AnkurBawiskar_0-1767095034264.pngAnkurBawiskar_1-1767095052937.png

 

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader