+ Start a Discussion
Mohd AshharMohd Ashhar 

FSL getslot global method error

Hi, I am working on FSL , the global method FSL.getappointmentBooking.getSlots is giving error on line 767  "Attempt to dereference a null object", Can anyone help me on that?
NagendraNagendra (Salesforce Developers) 
Hi Mohammed,

Sorry for this issue you are encountering.

May I suggest you please post the code snippet of what you have tried so that we can look into the code and can help you troubleshoot the issue accordingly.

Happy to help further.

Thanks,
Nagendra
Mohd AshharMohd Ashhar
Even on Book Appointment, I am getting this error.
Mohd AshharMohd Ashhar
OperatingHours abOperatingHours = [SELECT Name, Id, (SELECT EndTime, StartTime, Type, DayOfWeek FROM TimeSlots) 
                FROM OperatingHours WHERE Name ='Eastern Time Zone' limit 1];

           
            FSL__Scheduling_Policy__c schedulingPolicy= [select id from FSL__Scheduling_Policy__c where Name ='Customer first' limit 1];
            Id schedulingPolicyId = schedulingPolicy.Id;
            Timezone tz = UserInfo.getTimeZone();

            System.debug(' for FSL: ' + ' ' + schedulingPolicyId + ' ' + abOperatingHours + ' ' + tz);
            

            // now time to get slots
            List<FSL.AppointmentBookingSlot> bookingSlots = FSL.AppointmentBookingService.GetSlots('08p4B00000007rlQAA', schedulingPolicyId, abOperatingHours, tz,  'SORT_BY_DATE', false);
            System.debug('!@#book'+bookingSlots);


The code I am using , this one was working fine last week, nothing changed in this from last week. 
Thanks

Steven haddockSteven haddock
I am having this same issue. Were you able to figure this out?
Mohd AshharMohd Ashhar

Yes, this issue arise if you do not have proper permission set assigned. 

Thanks

Andi Surjanto PDevAndi Surjanto PDev
Hi Mohd,

I wonder what permission sets assigned to fix your issue since I am having the same issue.
Thank you for your sharing.