How to display latest short description of RITM in notification

B somanna
Tera Contributor

Hi Team, 

I have created a notification on sc_req_item table and in email script i have given to print current.short_descripton.

 I need the short description of RITM to be visible on notification.

But when i create request , given short description as 'Test' for RITM , sometimes i see default short description  RITM and somtimes as 'Test'  its not constant in notification 

Pls refer the below img.

Here in RITM form default text is overridden by 'TEST '

Bsomanna_0-1675668457093.png

 

but in email notification its giving default one

Bsomanna_1-1675668628629.png

here is a email script code

Bsomanna_2-1675668822362.png

How to make short description as given by end user while requesting?

 

Thanks

 

 

14 REPLIES 14

Hi @Ankur Bawiskar , @Martin Ivanov 

First of all thanks for your response and helping me.

Below is the triggering condition for notification 

Bsomanna_0-1675694539634.png

can i use gs.sleep() in email script as below, will this solve my issue ?

Bsomanna_1-1675694696224.png

 

 

 

@B somanna 

I didn't get why gs.sleep is required

Did you identify why the values are coming as different? any script is manipulating the short description of RITM before email is triggered

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

Hi @Ankur Bawiskar 
I just know that RITM Short description default text is  copied by REQ  not sure which script is manipulating , whoever when user enters short descript from portal , it is updates on RITM form as well as REQ from. 
but the issue is when notification is received with current.short_description , the value is flicker sometimes i get default text itself and sometimes the short description entered by end user. but i need the short desc enter by user in notification.

 

RITM form

Bsomanna_0-1675698056352.png

 

REQ Form 

Bsomanna_1-1675698281876.png

 

i will try to debug this more , Thanks a lot for your response !

 

 


 

@B somanna 

So there is some script which is overriding it just before the email is triggered.

unless you debug you won't know

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

wndydngy
Tera Expert

Hi,

 

Make sure the notification is fired via event. Generate the event from a Business Rule and make sure to add the Short Description as one of the event parameters, that way you can just call it in the email notification script easily.