Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Notification are not visble under notification tab

akashlandge
Tera Contributor

I’ve created a Relationship under the Catalog Task [sc_task] table to display related notifications. This works for most notifications linked to a Catalog Task, but it does not show the out-of-the-box @mention notifications.

I can see those @mention notifications being logged, and I know they are created in the live_notification table, but they don’t appear in my current relationship.

Is there a way to build a relationship that also pulls in these @mention notifications from live_notification so they show up alongside the other task-related notifications?

akashlandge_0-1758803695657.png

 

2 REPLIES 2

M Iftikhar
Tera Sage

Hi Akash,

The behavior you’re seeing is because your current relationship is querying the Email [sys_email] table, which holds most task-related notifications. However, the out-of-the-box @mention notifications are stored separately in the Notification [live_notification] table. 

To include those @mention notifications alongside your other notifications, I recommend creating a separate relationship on the Catalog Task [sc_task] table that queries the Notification [live_notification] table directly. You can use the following script in the relationship’s query to ensure it pulls the relevant notifications linked to the Catalog Task:

(function refineQuery(current, parent) {
    current.addQuery("table", parent.sys_class_name);
    current.addQuery("document", parent.sys_id);
})(current, parent);

This script filters the live_notification records by matching the task’s table name and sys_id, effectively linking the @mention notifications to the task.

MIftikhar_0-1759158136451.png

 

Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

Ankur Bawiskar
Tera Patron
Tera Patron

@akashlandge 

@ mention notification are not stored in sys_email table

You will require another Relationship to be created between sc_task and live_notification table

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