• Jason Lari
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
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
Hi! I finally got this simple Apex Trigger working in Sandbox:
trigger restrictFileDeletion on ContentDocument (before delete) {
    String profileName=[SELECT id,Name FROM Profile WHERE Id =:UserInfo.getProfileId()].Name; 
       for (ContentDocument cd : Trigger.old){     
        If(profileName=='ALS Community v6'){
            cd.addError('You cannot delete this record!');
        }
    }
}

Then I went to deploy in production and I received this error "Code Coverage Failure The following triggers have 0% code coverage.  Each trigger must have at least 1% code coverage.restrictFileDeletion.

I have read all related threads and Trailhead, and I'm still stuck on how to write a test class to get this to deploy in production. I would be so appreciate of any help to get this working. I was so excited to get this working in Sandbox, now I've wasted hours, and it's still not working in production. Thanks in advance!!
Specifically, executing `/services/data/v39.0/actions/standard/createServiceReport` via the Workbench successfully creates the required PDF but making the same call with the same user details from an external REST Client only (but not the same Connected App) only generates an empty PDF file.

Using the OAuth Token as used by the FSL App in the same REST Client does create a correctly populated PDF. It is likely to be the Connected App but I cannot see differences between the two.