Unable to Edit Business Rule Script in ServiceNow – “Cannot edit in read-only editor” Error

Harshal G Patil
Tera Contributor

Hello ServiceNow Community,

I am facing an issue while creating a new Business Rule in my ServiceNow instance. When I navigate to the Advanced tab and try to write or edit the script in the Script Editor, I receive the following message:

“Cannot edit in read-only editor”

Because of this issue, I am unable to write or modify the Business Rule script.

Steps to Reproduce:

  1. Log in to my ServiceNow instance.

  2. Navigate to System Definition → Business Rules.

  3. Click New to create a new Business Rule.

  4. Open the Advanced tab.

  5. Try to type or modify the script in the Script Editor.

  6. The editor displays the message “Cannot edit in read-only editor.”

Expected Behavior:

The Script Editor should allow me to write and modify the Business Rule script when creating a new Business Rule.

Actual Behavior:

The Script Editor appears to be in read-only mode, and I cannot enter or modify any code.

Troubleshooting Information:

  • The issue occurs on the Business Rule form.

  • The Advanced tab is open.

  • The Script Editor displays the default executeRule(current, previous) function.

  • A message saying “Cannot edit in read-only editor” appears when I try to edit the script.

Questions:

  1. What could cause the Business Rule Script Editor to become read-only?

  2. Could this be related to user roles, ACLs, application scope, or instance configuration?

  3. Is there any specific configuration or permission required to edit Business Rule scripts?

  4. How can I troubleshoot and resolve this issue?

I have attached a screenshot showing the issue.

Any suggestions or solutions would be greatly appreciated.

Thank you!Screenshot (303).png

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@Harshal G Patil 

this is due to recent security restriction introduced in Zurich

Check if you have snc_required_script_writer_permission role and/or are assigned to "Conditional Script Writer" group.

After upgrading to the Zurich release, admin users are unable to edit script fields

💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏

Tanushree Maiti
Tera Patron

Hi @Harshal G Patil 

 

Which Servicenow version are your using.

 

If it is Zurich, Then its added a new scripting privideldge

 

Refer: https://www.servicenow.com/docs/r/zurich/release-notes/access-management-rn.html

TanushreeMaiti_0-1792653432624.png

 

You just explicitly add snc_required_script_writer_permission role to your user and check.

 

 

Ehab Pilloor
Giga Sage

Hi @Harshal G Patil,

 

Your current user needs to be part of Conditional Script Writer group and have snc_required_script_writer_permission role to access script fields, HTML and other fields where you add code.

 

Please Accept this response as Solution if it assisted you with your question & Mark this response as Helpful.

 

Kind Regards,

Ehab Pilloor