Disable @mention in activity steam

Brian Lancaster
Tera Sage

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);

 

16 REPLIES 16

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

Look at my screenshot here, it does the same call in my SOW

SUMANTHDOSAPAT_0-1747065799224.png

 

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.

BrianLancaster_0-1747066217631.png

 

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.

 

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.

 

BrianLancaster_0-1747067538073.png