Business Duration vs. Duration

John Vo1
Tera Guru

Can someone please explain what these 2 attributes are actually tracking and where these numbers are being generated from?   I have attached a screen shot.

Thanks,

John

22 REPLIES 22

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.


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


The GlideSchedule class (fully documented on https://developer.servicenow.com) is what should be used.



find_real_file.png


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.


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