Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

About Number of rows removed from this list by Security constraints: 20

Chang Shuang
Tera Contributor

I want to create a read ACL with script.

The script is like this (as an example).

 

answer =true;
if(current.opened_by != gs.getUserID()){
    answer = false;
}
 
But when I impersonate other user. 
the message is displayed :Number of rows removed from this list by Security constraints: 20
 
How can I solve  this issue?
Thank you very much.

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

If you use ALC then you will get this error.

The alternative is to use Before Query Business rule on your table, you can find similar BR on incident table that restrict accees to non-itil users

https://docs.servicenow.com/bundle/vancouver-platform-security/page/administer/company-and-domain-se...

https://www.servicenow.com/community/developer-blog/query-business-rules-a-definitive-guide/ba-p/227...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0523826

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

2 REPLIES 2

Anil Lande
Kilo Patron

Hi,

If you use ALC then you will get this error.

The alternative is to use Before Query Business rule on your table, you can find similar BR on incident table that restrict accees to non-itil users

https://docs.servicenow.com/bundle/vancouver-platform-security/page/administer/company-and-domain-se...

https://www.servicenow.com/community/developer-blog/query-business-rules-a-definitive-guide/ba-p/227...

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0523826

 

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Anubhav24
Mega Sage

If you are using ACL , this will always be shown as "Rows removed by security constraints" , instead you should try and use Query Business Rules to avoid this message.

Please mark helpful/correct if my response helped you