email_action Example?

Nawal Kishor Si
Tera Contributor

In Email Script one parameter  email_action . anyone please explain email_action with proper example. i'm not getting how to use this parameter?

Thank you 

1 ACCEPTED SOLUTION

Voona Rohila
Kilo Patron
Kilo Patron

Hi Kishor

email_action contains the GlideRecord for the email notification

 

email_action.name - email notification name

email_action.sys_id - email notification sys_id

email_action.category.getDisplayValue() - email notification category

 

Example:

template.print(" Name:"+email_action.name);
template.print(" sys_id: "+email_action.sys_id);
template.print(" Category:"+email_action.category.getDisplayValue());

find_real_file.png

find_real_file.png


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

5 REPLIES 5

Voona Rohila
Kilo Patron
Kilo Patron

Hi Kishor

email_action contains the GlideRecord for the email notification

 

email_action.name - email notification name

email_action.sys_id - email notification sys_id

email_action.category.getDisplayValue() - email notification category

 

Example:

template.print(" Name:"+email_action.name);
template.print(" sys_id: "+email_action.sys_id);
template.print(" Category:"+email_action.category.getDisplayValue());

find_real_file.png

find_real_file.png


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Thank you so much 

Anil Lande
Kilo Patron

Hi,

In Email Script email_action is glide Record Object of Email Notification i.e. It store your email Notification record.

When you call any email script from email notification using email_action you can check from which notification mail script is called.

For Example:

email_action.name is Name of your Notification i.e 'TEST Attachments'

email_action.collection is name of table i.e incident

email_action.subject subject added on notification record i.e 'TEST Attachments sent'

 

find_real_file.png

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Thank you