Skip to main content

Has anyone used RecurringPattern Class  to create recurring service appointments by code.

 

#FSLOfficeHours

#Spring24

#FSL

1 respuesta
  1. 26 feb 2024, 14:34

    Hello @Virendra Verma, you need an instance of RecurringPattern to be able to call the RecurringAppointmentsManager API (2 example in the documentation below : https://developer.salesforce.com/docs/atlas.en-us.field_service_dev.meta/field_service_dev/apex_class_FSL_RecurringAppointmentsManager.htm#apex_FSL_RecurringAppointmentsManager_methods)

     

    //Pattern object creation example

    RecurringPattern pattern = new FSL.RecurringPattern();

    pattern.DaysOfWeek = new Set<RecurringPattern.DaysOfWeek>{RecurringPattern.DaysOfWeek.Monday};

    pattern.FrequencyType = RecurringPattern.FrequencyType.WEEKLY;

    pattern.Frequency = 1;

    pattern.NumberOfVisits = 52;

    Eric

0/9000