function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gopikagopika 

Problem with ActivityDate in native salesforce holiday list


Hi friends,

I have a requirement to check for holidays. I am quering the ActivityDate from Holiday in my controller which gives me a list. But the ActivityDate is not getting the proper holiday date. The date which is coming in the ActivityDate is nowhere related to the correct holiday.I didnt find any other field in holiday to fetch the required dates.
I am not sure whether the issue is because of recent release.
Can anyone help in fixing the issue?

Thanks in advance
kcpluspluskcplusplus
Can you be more specific about what the value is that you are seeing compared to what you would expect? I don't know of any issues related to release, and tested a query myself that gave me the expected result.

--KC
gopikagopika
For example, 25th December 2014 is a holiday in my organization's Holiday list which is a recurring holiday. So the expected ActivityDate is 25/12/2014. But when I am querying the ActivityDate from Holiday (List<Holiday> lstHoliday= [Select ActivityDate from Holiday];), a random date(07/08/2014) is getting instead of the correct one. The same issue is coming for all the Holidays. These date is nowhere related to the Holiday.
kcpluspluskcplusplus
Wow, that is definitely a goofy one, I expected a date in the wrong year, or a slight deviation from the holiday. Honestly, you may have to log a support case for that one, strange issue. 

--KC
gopikagopika
Yes,I will be raising a premier support case for the same.
Nicole Cruz 7Nicole Cruz 7
Hi - we are experiencing the same issue where the holiday record is displaying the current year's holiday date (i.e., 12/25/2021) but when querying for the record the activityDate is referencing a different date (i.e., 12/25/2020). Did anyone ever find a solution to this?