Notifications

Snehal
Tera Expert

Hi Team ,

I just want to include the short description in subject but for request table its not working we have to take it from ritm or sctask table but i am not sure how to do that so can anyone tell me how to do that .i have attached some screenshots ,help much appreaciated .

Thank  You !

2 REPLIES 2

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

You can do it via mail scripts, but the thing is, a Request can have multiple (child) requested items, that can also have multiple (child) catalog tasks - this is also why there's no easy way to dot-walk to them from the request.

 

How does the hierarchy of REQ-RITM-SCTASK look like for your case, do you always have just one RITM? In case of an SC TASK, what is its relationship to the request?

You have to be able to answer these questions in order to write a mail script in the first place.

Siva Sai Teja
Tera Expert

@Snehal , so you need update the short description from RITM to REQ? In order to set email subject, you need to have email script please try as below (Assuming your notification is running on RITM table)

var gr = new GlideRecord('sc_request');
gr.addQuery('sys_id', curent.request);
gr.query();
if(gr.next()){
email.setSubject('SHORT DESCRIPTION FROM RITM = ' + current.short_description);

}
Please Mark āœ… Correct if this solves your query and also mark ļ‘ Helpful if you find my response worthy based on the impact.

Thanks