Check it status topic in VA - comments not updating

tejenderk
Tera Contributor

I am trying to trouble shoot a already existing topic 'check IT ticket status'

tejenderk_0-1740612720329.png

here va_comment is the variable in which we are taking the comment input
and update record has the script response message

(function execute() {
var response = '';
var requesterLang = vaContext.getRequesterLang();
var gr = new GlideRecordSecure(vaVars.table_name);
if (gr.get(vaVars.sys_id)) {
var comment = vaInputs.va_comment.getValue().trim();
if (comment) {
gr.comments = comment;
gr.update();
if (vaVars.table_name == 'incident')
response = gs.getMessageLang("I've updated the incident.", requesterLang);
else
response = gs.getMessageLang("I've updated the requested item.", requesterLang);
} else {
response = gs.getMessageLang("OK, no comment will be added.", requesterLang);
}
} else
response = gs.getMessageLang("I couldn't find the record.", requesterLang);

return response;
})()


i dont understand why it doesnot work
tejenderk_1-1740612968498.png

Kindly help me 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@tejenderk 

is that an OOB topic?

if yes then is that not working?

What debugging did you perform?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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