Filter @mention on CSM workspace

Ariel Aharon
Giga Guru

Hey everyone,

 

I have a BR that filters the mention's users on work notes on the basic regular Case form.

This filtering is required for the same field on the CSM Configurable Workspace, but when trying to see if that BR is triggered on the workspace, this doesn't seem to be working.

 

BR is written as such:

 

 

(function executeRule(current, previous /*null when async*/ ) {
    try {
        if (gs.action.getGlideURI() != '') {
            if (gs.action.getGlideURI().getMap() != '') {
                if (gs.action.getGlideURI().toString().startsWith('api/now/form/mention/record/'))
                    current.addEncodedQuery("active=true^roles=snc_internal");
                current.addActiveQuery();
            }
        }
    } catch (errObj) {
        gs.error('Global_Set_Filter_Mention-' + errObj);
    }
})(current, previous);

 

Filter @mention on CSM workspace

6 REPLIES 6

Mark Manders
Mega Patron

I think you will need to apply this through the UI builder, because the workspace interacts differently. If you add logging to it, do you even get any logs?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

There are some logs whenever I add them to the business rule, but nothing seem to be related to the mention feature, plus, none of the logs show whenever the feature is used (querying the user's table actively).

 

Is the Activity component customizable? is there any configuration possible using OOTB tools (e.g. UI Builder...) to achieve that?

SofiiaA
Tera Contributor

Hi Ariel, Have you found a resolution in this case? 

Hi Sofia!

 

After reaching out to servicenow's support and trying to figure out ways to implement it we currently rollbacked this to Ootb meaning no filter applied.

 

By using that business rule query you have a lot of power controlling who is querying a table and what records are returned. but since we were asked to limit this to mentions, and also it must work both on workspace and legacy view, I could'nt distinct requests in workspace like I could in legacy's view