Disable @mention in activity steam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2025 08:35 AM - edited 05-08-2025 08:48 AM
I tried to follow How to Disable Activity Stream Mentions in Helsinki but is is not working for me. As soon as you type in the @ symbol in work notes or comments it is still querying the users table. I used log statements and I can see that is is going into the if statement in the BR but its like it is skipping the addNullQuery. Any ideas on why this is happening?
Correction: It is working unless you try to mention someone associated with the task. For example I'm testing with an incident. If I mention either the caller or the assigned to there name still appears. How do I prevent that as well?
(function executeRule(current, previous /*null when async*/ ) {
try {
if (GlideTransaction.get().URL.startsWith('/api/now/form/mention/record/')) {
current.addNullQuery("sys_id"); //All records have a sys_id so we are filtering out all records
}
} catch (e) {
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 08:56 AM
That works with the standard UI but does not work with SOW. If I gs.log that I get a different URL but not what the BR is expecting and still seem to generic to use.
/api/now/v1/batch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 09:03 AM
Look at my screenshot here, it does the same call in my SOW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 09:10 AM
Here is by BR:
(function executeRule(current, previous /*null when async*/) {
if(GlideTransaction.get().URL.startsWith('/api/now/form/mention/record/')){
current.addNullQuery('sys_id');
}
})(current, previous);
This is what it does in SOW in my PDI. My PDI is on Xanadu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 09:22 AM
strange! even my PDI is on Xanadu and it works.
Try checking the network logs.
> Inspect page
> go to network tab
> clear logs
> now enter @AM
> You'll find one result with sysid of incident
> Click on that and then go to headers tab to see if that triggerred.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 09:32 AM
I don't see sys_id of the incident. I see sys_id of the users that are returned and something that just batch. When I click on batch it gives me the URL I put up before my gs.log give me (
/api/now/v1/batch). If I click on the sys_id or the user it returns the URL to the user record.