Business Duration vs. Duration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 04:59 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 02:26 PM
Take a look under System Policy> SLA> Calendars. There is one record provided OOB which I believe is where it storing that. I don't see a flag or any other method to indicate a default however. Not much docs on them since they've been deprecated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 02:33 PM
Cool...thanks...what is used now to calc these fields...is there a replacement for "calDateDiff"...obviously updating from Fuji to Helsinki it's still calDateDiff...and when I look at my personal Developer's instance it still refers to calDateDiff...
Just would seem if its being deprecated that it would have a replacement using schedules...
ML

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 02:35 PM
The GlideSchedule class (fully documented on https://developer.servicenow.com) is what should be used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2016 06:50 AM
I just opened a ticket with ServiceNow for this, but maybe will get an answer here.
I attempted to update mark_closed/mark_resolved to use GlideSchedule/GlideDuration. However I can't seem to find a way to get the number of seconds from GlideDuration to store in the business_stc field.
And I'll mention here, while calendars might be deprecated, there are still a few places that use them. For example, user notification preferences, you can add a calendar for when you want to receive notifications, that has not been moved to schedules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2016 02:02 AM
Chris,
I've been struggling with getting a duration field updated with the results of a duration calculation, i twigged this morning that the duration calculation outputs in seconds and the duration fields expect milliseconds if you're using setDateNumericValue() once i multiplied the output by 1000 it resolved the issue.
Regards
John