この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

RecurringAppointmentsManager クラス

毎週繰り返される予定のパターンを返す getRecurringAppointmentSlots メソッドを使用した結果を表します。

名前空間

FSL

使用方法

RecurringAppointmentsManager は、RecurringPattern クラスを必須パラメーターとして取り、毎週繰り返される RecurringSequence 予定のリストを返す Apex クラスです。

RecurringAppointmentsManager のメソッド

RecurringAppointmentsManager には、次の静的メソッドが含まれます。

getRecurringAppointmentsSlots

RecurringSequence 予定のリストを返します。

シグネチャー

static List getRecurringAppointmentsSlots

パラメーター

ServiceID
型: Id
必須。最初の予定を予約するために使用するサービス予定オブジェクト。
PolicyID
型: Id
必須。業務に関連する作業ルールや目標を取得するために使用するポリシー。
CalendarOperatingHoursId
型: Id
必須。返される時間枠の構造 (例: 09:00-10:00、10:00-11:00 など) を決定します。
RecurringPattern
型: RecurringPattern クラス
必須。このクラスのインスタンスは、繰り返しパターンからの必要な詳細をすべての含むパラメーターとして送信されます。
SchedulingOptionsCount
型: Integer
必須。最終的な回答で返すスケジュールオプシ���ンの数 (例: 上位 3 件のオプション)。

戻り値

型: List RecurringSequence

使用方法

このメソッドは、毎日、毎週、または毎月繰り返される予定のリストを返します。

次の例では、繰り返される予定のリストを取得しています。最初の例ではメソッド、2 番目の例ではスクリプトを使用します。

例 1:

1//Using a method (example):
2public callRecurringVisitsAPI(Id serviceID, Id policyID, Id calendarOperatingHoursId, Integer SchedulingOptionsCount) {
3        
4//Fill the pattern object
5RecurringPattern pattern = new FSL.RecurringPattern();
6pattern.DaysOfWeek = new Set<RecurringPattern.DaysOfWeek>{RecurringPattern.DaysOfWeek.Sunday, RecurringPattern.DaysOfWeek.Wednesday};
7pattern.FrequencyType = RecurringPattern.FrequencyType.WEEKLY;
8pattern.Frequency = 3;
9pattern.NumberOfVisits = 10;
10
11//Call the API
12FSL.RecurringAppointmentSlots result = RecurringAppointmentsManager.getRecurringAppointmentsSlots(serviceID, policyID, calendarOperatingHoursId, SchedulingOptionsCount, pattern);
13}
14
15}

例 2:

1//Using a script:
2
3//Fill the pattern object
4FSLMPDEV.RecurringPattern pattern = new FSL.RecurringPattern();
5pattern.DaysOfWeek = new Set<FSL.RecurringPattern.DaysOfWeek>{FSL.RecurringPattern.DaysOfWeek.Tuesday, FSL.RecurringPattern.DaysOfWeek.Wednesday, FSL.RecurringPattern.DaysOfWeek.Thursday};
6pattern.FrequencyType = FSL.RecurringPattern.FrequencyType.WEEKLY;
7pattern.Frequency = 2;
8pattern.NumberOfVisits = 12;
9
10//parameters init
11Id policyID = 'a1Lx00000004PoVEAU';
12Id serviceId = '08px000000OE11dAAD';
13Id operatingHoursId = '0OHx0000000D5IiGAK';
14Integer scheduleOptionsCount = 3;
15
16//Call the API
17FSL.RecurringAppointmentSlots result = FSL.RecurringAppointmentsManager.getRecurringAppointmentsSlots(serviceId , policyID, operatingHoursId, scheduleOptionsCount , pattern);
18
19//Handle the response of the API (example only)
20for (Integer i=1 ; i<= result.recurringSequences.size() ; i++){
21    System.debug('Sequence number: ' + i);
22    System.debug('participatingResources details: /n' + result);
23    System.debug('visitSchedulingOptions details: /n' + result);
24    System.debug('averageObjectivesGrades details: /n' + result);
25    System.debug('sequenceScore details: /n' + result);
26    System.debug('firstPatternOccurrence details: /n' + result);
27}