Add watchlist to display BR

ceraulo
Mega Guru

Hello,

 

I have a display BR  (from servicenowguru) that displays tickets if you are the caller, on behalf of, or member of the assignment group. I also want those in the watch list to view the tickets. Is this possible?

 

Below is my script.

if (gs.getSession().isInteractive()) {
        var user = gs.getUserID(); 
        var groups = getMyGroups(); 
        var q = current.addQuery('u_caller', user).addOrCondition('u_on_behalf_of', user).addOrCondition('assignment_group', groups); 
    }

 

Please help!

Thank you.

 

2 REPLIES 2

Anand Kumar P
Giga Patron
Giga Patron

Hi @ceraulo ,
Display business to get  server side data and call in client script with g_scratchpad object.

Query business rule alternative way of ACl in query business it gives limited  access to particular user.

Example :prevents users from accessing incident records unless they have the itil role, or are listed in the Caller or Opened by field.

 

You have to write query business rule not display business rule

if (gs.getSession().isInteractive()) {
        var user = gs.getUserID(); 
        var groups = getMyGroups(); 
        var q = current.addQuery('u_caller', user).addOrCondition('u_on_behalf_of', user).addOrCondition('assignment_group', groups); 
    }

Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
 

@Anand Kumar P 

My apologies. The BR I created was a Query BR. It is working correctly. But an additional requirement came up which is also to allow those in the watch list to view the records. Is this possible using the script that I provided?