- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 06:21 AM
Hi All,
Please help me on the visual task board (private task). Notifications are triggered as undefined when the additional comments are updated for the user only for private task updates. Please find the below code for reference.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 06:50 AM
Hi,
Try updating your script include part like below:
//I believe below GlideRecord is not is not required because document field stored the sys_id
taskSysID = live_notif.document.toString();
//--------------------------------------------------------------------
//if you want to try your code then modify your code like below
//Populate taskSysID with the sys id of the task record that the mention was used in
var taskGL = new GlideRecord('task');
//taskGL.addQuery('number', live_notif.title);
taskGL.addQuery('sys_id', live_notif.document.toString()); // use sys_id based search to find correct record
taskGL.query();
while(taskGL.next()){
taskSysID = taskGL.getUniqueValue();
}
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 05:51 AM
Yes, you can make use of GlideRecord script to get Task Record and number.
//Populate taskSysID with the sys id of the task record that the mention was used in
var taskNumber;
var taskGL = new GlideRecord('task');
taskGL.addQuery('sys_id', live_notif.document);
taskGL.query();
if(taskGL.next()){
taskSysID = taskGL.getUniqueValue();
taskNumber = taskGL.number;
// get any additional deatils
}
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 06:50 AM
Hi,
Try updating your script include part like below:
//I believe below GlideRecord is not is not required because document field stored the sys_id
taskSysID = live_notif.document.toString();
//--------------------------------------------------------------------
//if you want to try your code then modify your code like below
//Populate taskSysID with the sys id of the task record that the mention was used in
var taskGL = new GlideRecord('task');
//taskGL.addQuery('number', live_notif.title);
taskGL.addQuery('sys_id', live_notif.document.toString()); // use sys_id based search to find correct record
taskGL.query();
while(taskGL.next()){
taskSysID = taskGL.getUniqueValue();
}
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 05:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 05:51 AM
Yes, you can make use of GlideRecord script to get Task Record and number.
//Populate taskSysID with the sys id of the task record that the mention was used in
var taskNumber;
var taskGL = new GlideRecord('task');
taskGL.addQuery('sys_id', live_notif.document);
taskGL.query();
if(taskGL.next()){
taskSysID = taskGL.getUniqueValue();
taskNumber = taskGL.number;
// get any additional deatils
}
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 06:02 AM
Glad to know your issue is resolved, could you please close this question by marking appropriate answers as correct solution?
Thanks
Anil Lande