Issue with ServiceNow health scan findings wrt GlideRecord/GlideAggregate in read ACLs

Suggy
Giga Sage

ServiceNow says "Read ACLs should not have GlideRecord/GlideAggregate in script"

But OOB ServiceNow has itself provided SEVERAL read ACLs with GlideRecord/GlideAggregate in script 😞 

Crazy!!! why?

Suggy_0-1731305662330.png

 

2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

You can find out of the box examples in just about every health scan finding, but the guidance should still be considered.  In this case, you want to avoid using GlideRecord and GlideAggregate in ACLs, and use caution when it 'must' be done.  The reason for this is that it could cause the form/list/... to load slowly if there are a combination of queries, or one that has a high processing / run time / record retrieval.  So you don't want an ACL to cause a performance impact.  Like most guidelines though, sometimes it cannot be avoided. 

Hi @Brad Bowman  Yes I agree on the guidelines and its impact. I was just thinking why ServiceNow themselves are using GlideRecord/GlideAggregate in read ACLs and telling us not to do so. If it was few of them, fine, but there are 100s such ACLs OOB.