Servicenow Working with ACLs and Business Rules to read Incident table
<p>I am currently working on a role called "read_incident" which should allow EES Users read the incidents of their assignment group.</p>

<p>Therefor I did the following:</p>

<ul>
<li>created a role "read_incident"</li>
<li>assigned the role to group "Service Desk"</li>
<li>created a user "Denis" and added him to the "Service Desk" group</li>
<li>modified the query incident Business rule using an addorcondition to include my "read_incident" role to read incidents. (now you either have the "itil role", or the "read_incident" role to read incidents.</li>
<li>created an ACL with dynamic filter to read incidents if the assignment group is one of my groups.</li>
</ul>

<p>Now I created a homepage using a gauge of a list report of incidents which are assigned to "service desk" group.</p>

<p>As admin I can see all the incidents of course. But when I impersonate "Denis", the incident list reports the following "<strong>No records to display</strong>"</p>

<p>So nothing is blocking me from reading incidents, but somehow there is no Data match.
I tried creating a new incident and assign it to the "service desk" but still this incident isn't visible for the user "Denis".</p>

<p>What I know until now:
- Business rule is 100% working, because no "data is blocked" - I can query the incident table</p>

<p>The Business rule:</p>

<pre><code>if (!gs.hasRole("itil").addOrCondition(!gs.hasRole("read_incident") &amp;&amp; gs.isInteractive()) {
  var u = gs.getUserID();
  var qc = current.addQuery("caller_id", u).addOrCondition("opened_by", u).addOrCondition("watch_list", "CONTAINS", u);
  gs.print("query restricted to user: " + u);
}
</code></pre>