Has anyone used RecurringPattern Class to create recurring service appointments by code.
답변 1개
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