Unable to Edit Client Scripts in ServiceNow PDI – “Cannot edit in read-only editor”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I'm facing an issue in my ServiceNow Personal Developer Instance (PDI) while creating or editing Client Scripts.
Issue:
When I open a Client Script in ServiceNow Studio, the editor displays the error:
Cannot edit in read-only editor
Troubleshooting steps I've tried:
Refreshed the page and logged out and back in.
Confirmed that my user has the admin role.
Checked my membership in the Conditional Script Writer group.
Verified that the system property glide.security.scripting_role.auto_provisioning is set to true.
Opened the Scripting Governance Tool and checked the manual configuration.
Confirmed that my user appears in the Keep list, but the editor is still read-only.
Checked my user's Roles related list, but snc_required_script_writer_permission was not present.
I'm using the Device Order Management System (DOMS) application scope.
Could someone please help me identify the root cause and the correct steps to resolve this issue? I'd appreciate a solution that doesn't involve removing other users from the Conditional Script Writer group or making unnecessary changes to system properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
The Scripting Governance tool introduces granular control over who can edit any type of script.
Apart from Admin user ,
Users must be either:
- part of Conditional Script Writer group OR
- snc_required_script_writer_permission role assigned to user
The tool monitors any action where a user saves data into a field that could contain executable code. This includes:
- Business rules
- Client scripts
- Script includes
- UI policies
- Background scripts
- Any other scriptable elements
Refer KB :KB2581331 Scripting Governance tool and Conditional Script Writer group overview
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @AshishS88624511,
Add snc_required_script_writer_permission role to your user if it is not available.
Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.
Kind Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Ehab,
Thank you for your suggestion. I added the snc_required_script_writer_permission role to my user and logged out and logged back in, but the issue still persists. I continue to get the error "Cannot edit in read-only editor."
I am also a member of the Conditional Script Writer group, and the Scripting Governance Tool shows my user in the Keep list.
Could you please suggest the next troubleshooting step for my ServiceNow PDI?
Thank you!
