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
Jason LariJason Lari 

Calling FSL.ScheduleResult Schedule(Id policy, Id serviceID) from a test class no longer works since 10/12/2019. It has been working fine till recently. The call still works in a normal class.

The error is the same for each call being made and I have pasted that error below.

FSL.Exceptions.GeneralException: Argument cannot be null.
Stack Trace: Class.FSL.ServiceSchedulingSlotsService.GetSlots: line 295, column 1 Class.FSL.GradeSlotsService.calculateSingleServiceGradedMatrix: line 342, column 1 Class.FSL.GradeSlotsService.createFSLOperationIfNeededElseCalculateSlots: line 291, column 1 Class.FSL.GradeSlotsService.GetGradedMatrix: line 169, column 1 Class.FSL.ScheduleService: line 631, column 1 Class.FSL.ScheduleService: line 402, column 1 Class.FSL.ScheduleService: line 106, column 1 Class.FSL.ScheduleService: line 85, column 1 Class.FSL.ScheduleService.Schedule: line 30, column 1 Class.JL_Field_Service_Lightning_Test.FSL_Opp_SiteCheck_Status_Test: line 427, column 1 Caused by Class.FSL.RuleGap_Rule_Service.reduceTimeInterval: line 1750, column 1 Class.FSL.RuleGap_Rule_Service.calculateSchedulingOption: line 1263, column 1 Class.FSL.RuleGap_Rule_Service.CalculateOptionsForResource: line 599, column 1 Class.FSL.ServiceSchedulingSlotsService.buildAdvancedMatrixByResource: line 922, column 1 Class.FSL.ServiceSchedulingSlotsService.GetSlots: line 288, column 1 Class.FSL.GradeSlotsService.calculateSingleServiceGradedMatrix: line 342, column 1 Class.FSL.GradeSlotsService.createFSLOperationIfNeededElseCalculateSlots: li