How to restrict system updated field (sys_updated_on)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Community,
I want to restrict Updated (sys_updated_on) field to be updated when status changes to ' Failed to Calculate commute time'. Since the status value changes takes place through flow designer. I'm not sure if modifying the flow is good idea. However, I tried with before as well as after BR with the condition status changes to ' Failed to Calculate commute time' and script autoSysFields(false) but this is not working.
Flow step:
Please help how this can be achievable.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
23m ago
then please have an error handling mechanism and have task so that someone reviews the calculation
how would you know if the calculation is wrong? are you also calculating with same numbers in ServiceNow?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
hi @Ankita Kolhe ,
Since the record is being updated through Flow Designer, try replacing the Update Record action with a Script step or custom Action that uses GlideRecord to update the record.
Call autoSysFields(false) before update() to prevent automatic updates to sys_updated_on, sys_updated_by, and sys_mod_count for that particular update.
Also, check that no subsequent flow step or Business Rule updates the same record again.
If this helped, mark it helpful and accept the solution.
Regards,
Tejas
