Test read-only options
Test read-only behavior on a non-production instance before updating Read only option field values on your production instance.
Before you begin
Role required: admin
About this task
Read-only fields created prior to the Australia release are automatically set to Instance Configured after upgrading to at least Australia. You can use the Instance Configured option to test the read-only options introduced in the Australia release in a non-production instance before making changes in your production instance.
When a field's Read only option is set to Instance Configured, read-only behavior is derived from the glide.read_only.legacy_read_only_behavior system property. By default, the property is set to client_script_modifiable, which honors the pre Australia read-only behavior, allowing changes to read-only fields through client scripts.
Important: The glide.read_only.legacy_read_only_behavior system property is only intended for testing read-only behavior on non-production instances. Updating this property affects all fields where the Read only option field is set to Instance Configured.
Procedure
Navigate to the System Properties [sys_properties] table's list view.
Select All.
In the Filter field, enter
sys_properties.list.Press Enter.
Search for a system property record with name glide.read_only.legacy_read_only_behavior.
Select the glide.read_only.legacy_read_only_behavior system property.
In the Value field, enter the read only option that you want to test.
The option that you enter determines how strict the system treats the security of read-only values once they've been entered. Each option displays the field as read-only in the UI.
| Option | Description |
|---|---|
display_read_only | Allows changes to the read-only field through client scripts and server-side operations such as TableAPI, GraphQL, and GlideRecordSecure(). |
client_script_modifiable | Allows changes to the read-only field through client scripts but not through background scripts or server-side APIs like TableAPI, GraphQL, and GlideRecordSecure(). |
strict_read_only | Prevents any changes from both client scripts and server-side APIs. |
- Select Update.
What to do next
Test any client scripts or server-side APIs that update read-only fields work as expected in your non-production environment. After testing the functionality, you can update individual fields in your production instance and set the Read only option field to the option that you verified in your non-production instance.
Parent Topic:Configuring read-only security options