Record is being aborted on update but there is no abort BR on the same table. How it is possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Record is being aborted on update but there is no abort BR on the same table. But there is BR on different table which is not linked to the table. How it is possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
(function executeRule(current, previous /*null when async*/) {
if(current.start_date_time.nil() || current.end_date_time.nil()) {
gs.addErrorMessage(gs.getMessage("The dates and times you entered were not valid"));
current.setAbortAction(true);
return;
}
var startMs = current.start_date_time.getGlideObject().getMS();
var endMs = current.end_date_time.getGlideObject().getMS();
if (endMs < startMs) {
current.setAbortAction(true);
gs.addErrorMessage(gs.getMessage('End date time cannot be before start date time'));
}
})(current, previous);
Yes the same date time fields are there on span table as well and one of the fields is getting emptied out while updating, as per the script if any of the field is empty it will abort the update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I couldn't find 'user_calendar_event" table in my PDI
what happens if you deactivate that BR?
are you allowed to save?
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I haven't tried and am not allowed to update the OOTB things.
Appreciate your time. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
if it's DEV then no harm in updating the OOTB BR
Unless you do that how will you debug?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
