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

Testcase issue

Error Message System.NullPointerException: Attempt to de-reference a null object   


"h" is holiday object (standard one)


error in this line - Class

b = h.ActivityDate.daysBetween(h.RecurrenceStartDate);


Can you provide more details on the code surrounding this?  Keep in mind that some holidays specified may not be recurring, so you may need to wrap the error causing line with if (h.RecurrenceStartDate != null).