Business Calendar Filter - Year End Mismatch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2024 05:38 AM
Hello everyone,
I am working on adding a new filter option to allow me to filter for records in the previous fiscal year. I attempted to create one using Define business calendar filtering options (servicenow.com), however when I filtered it returned results up to one week after the end of the fiscal year. The problem appears to be that the function that this filter uses, sn_bc.GlideBusinessCalendarUtil.getCalendarEnd gets a different end time than the end time displayed on the fiscal year. The default view of these records (which exist on the [fiscal_period] table) shows the "end_date_time" field, and this is the field that you set and see throughout the platform. The "fiscal_end_date_time" field also has that same value. However, the function mentioned above uses the "end" field, which isn't shown in the default view and has a value (at least for me) of one week after the end of the fiscal year. Any advice would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 06:19 AM
The issue was that whenever someone updated the "end_date_time" field, it does not automatically update the "end" field (and no one knew about it since it's not shown in the default view). After resolving that mismatch everything worked perfectly.