cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Business Calendar in unity script? specially to check holidays.

Shital_Varade
Champ in-the-making
Champ in-the-making

I am trying to read holidays from defined/created business calendar in configuration. but I am unable to read it. Can anyone please answer?

2 ACCEPTED ANSWERS

Aki_Daiguji
Star Contributor
Star Contributor

Hi Shital,

None of the OnBase APIs have any functionalities to access OnBase-defined calendars. If you would like an SCR for this functionality, please reach out to the API Support team and request for an SCR.

View answer in original post

Adam_Ryman1
Champ on-the-rise
Champ on-the-rise

Good Morning Shital,

As Aki mentioned, this is not something the Unity API exposes at this time. We recently also had a need to check holidays from the calendar, so as a workaround I was able to come up with the following method which will evaluate whether a DateTime object is a configured holiday or not.

Thanks,

Adam Ryman

IT Software Developer, OnBase

EverBank

View answer in original post

9 REPLIES 9

Aki_Daiguji
Star Contributor
Star Contributor

Hi Shital,

None of the OnBase APIs have any functionalities to access OnBase-defined calendars. If you would like an SCR for this functionality, please reach out to the API Support team and request for an SCR.

Adam_Ryman1
Champ on-the-rise
Champ on-the-rise

Good Morning Shital,

As Aki mentioned, this is not something the Unity API exposes at this time. We recently also had a need to check holidays from the calendar, so as a workaround I was able to come up with the following method which will evaluate whether a DateTime object is a configured holiday or not.

Thanks,

Adam Ryman

IT Software Developer, OnBase

EverBank

Hi Adam,

Thank you for sharing the script - I am just starting to use scripts so I appreciate seeing work examples.

Taking a low-tech approach, do you think an external AFKS could be configured using the same sql query then use workflow to check if today exists in the AFKS (is a holiday) might work? perhaps more steps in workflow than through the script, though it could open up the possibility of reaching out to (for example) the Human Resource application for business holidays via the external AFKS, eliminating the management of Business Calendars in OnBase.

thanks for considering this

Dont forget to check if the day == 0 or 6 if you also want to exclude weekends.