GlideRecord Vs GlideRecordSecure

Shankar19
ServiceNow Employee
ServiceNow Employee

HI,

In terms of performance, which is best practice to use?

GlideRecordSecure or GlideRecord with canRead?

Thanks

1 ACCEPTED SOLUTION

Rajeev Jayaswal
ServiceNow Employee
ServiceNow Employee

I see multiple answers to this question, but none of them discuss the GlideRecord() method with the canRead() method. 

 

If we use GlideRecordSecure(), it evaluates all ACLs (read/write/create/delete/etc.), so the overall execution time is relatively higher. 

 

With the GlideRecord() and canRead() method, it doesn't need to evaluate all ACLs here. If we are using canRead(), then only READ ACL will be evaluated, which skips other ACLs. 

So with GlideRecord() & canRead(), we will be able to achieve both security and performance (to some extent only), so better to use this one. 

 

 

 

 

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

GlideRecord doesn't evaluate ACL

GlideRecordSecure evaluate ACL

It depends on requirement which one to use

more link for help

GLIDERECORD VS GLIDERECORDSECURE

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

shloke04
Kilo Patron

Hi,

It will depend on project requirement but for say when you want to evaluate Security policies as well I would recommend to go with Glide Secure with advantage being it evaluates Security Policies as well, have used it mostly for Service portal use case in my project.

I don't see any performance impact when using GlideRecord Secure in my project or other in the past. Please refer the link below for more info on this:

Check this video from hardit to learn more on this:

https://www.youtube.com/watch?v=rVJAxIn4Cd8

https://community.servicenow.com/community?id=community_question&sys_id=43f33fc7db4d2300a8562926ca9619c1

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Omender Singh
Tera Guru

It is explained properly here - Click Here

AmariMertz
Tera Contributor

GlideRecordSecure is a more secure way to access data from the database table. GlideRecordSecure enforces ACL (Access Control List) restrictions, which means that the user can only access data from the table if they have the necessary permissions. GlideRecordSecure is the recommended method of accessing data in ServiceNow as it is more secure and follows best practices, especially when dealing with sensitive data. It is important to understand the differences and use GlideRecordSecure when necessary to ensure data security and compliance with company policies. Well, also visiting https://casinosanalyzer.com/casino-bonuses/bitcoincasino.io website is really useful when you have to find the best casino by reading reviews.