Scheduled Background Script – GlideRecordSecure() not updating Incident HTML Description field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello!
I have a scheduled background script that updates the incident.description HTML field.
Now I've read about ServiceNow scripting governance tool and I have added the admin user and all required users the snc_required_script_writer_permission role.
but still the field doesn't update.
- My script uses GlideRecordSecure() for the update
- Field-level ACL on `incident.description` requires the `sn_incident_write` role - which has also been granted to admin user
Still doesn't work.
If I switch to the standard GlideRecord(), it updates correctly.
How to make my script work without stripping the "Secure"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @NoorulHudaN ,
If it only issue with GlideRecordSecure please check in Access Analyzer for a specific user and specific record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @NoorulHudaN ,
So basically here, GlideRecordSecure() is doing its job by enforcing ACLs. The fix is not in the script itself but in ensuring the execution context has the required role.
Scheduled jobs run as the system user, which may doesn't have your roles.
assign sn_incident_write to the system user OR run the script impersonating the user.
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
25m ago
Hi @NoorulHudaN
Add the user to conditional script writer group. It should work after that ( not tested at my end).
Refer KB2581331 : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2581331
also refer: https://www.servicenow.com/community/app-engine-forum/issue-with-html-field-users-can-t-update-value....

