Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

hide script on script include

sydneyespos
Tera Expert

Hi community, do you have insights on how to hide the script section in script include for a particular script include? Only certain role can view the script. 

1 ACCEPTED SOLUTION

GlideFather
Tera Patron

Hi @sydneyespos,

 

a script include without the script field is useless... why would you do that?

 

If you want to restrict the access, then you can apply custom ACL on [sys_script_include] table... with that only specific role or group of users will have access to that field.

 

EDIT: custom ACL or adjust existing ones

https://yourinstance.service-now.com/sys_security_acl_list.do?sysparm_query=nameSTARTSWITHsys_script_include

 

Or you can think of adding/removing snc_required_script_writer_permission role but it would have impact on all scripting, not just script include:

GlideFather_0-1771576014422.png

This role was introduced one or two releases back, so check if your instance have it.

_____
100 % GlideFather experience and 0 % generative AI

View solution in original post

11 REPLIES 11

Aditya_hublikar
Mega Sage

hello @sydneyespos ,

 

 Why you don't create record level acl as mentioned by @GlideFather . That ACL will hide whole record for unauthorized role.

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya

yashkamde
Kilo Sage

Hello @sydneyespos ,

 

For this I created custom View and in that excluded script section and given the role :

Screenshot 2026-02-20 143112.png

 

Then Impersonated the user with the role so script section is not visible and the view is particulary visible to the user :

Screenshot 2026-02-20 142949.png

 

And normal Default View is this :

Screenshot 2026-02-20 143053.png

 

If my response helped mark as helpful and accept the solution.

@yashkamde 

User can still see the script from list view although it's blocked from form.

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

Yes @Ankur Bawiskar ,

 For this :

Screenshot 2026-02-20 143112.png

 

If my response helped mark as helpful and accept the solution.

@yashkamde 

but user can add script field by personalizing the columns from gear icon

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