ScheduleResult Class

Represents the result of scheduling a service appointment that is returned by the ScheduleService.schedule method.

FSL

This example shows the contents of a returned ScheduledResult object.

ScheduleResult contains the following properties.

Not currently in use.

public ResourceAbsence breakObject {get; set;}

Type: ResourceAbsence

The grade of the slot in which the service appointment was scheduled.

public Decimal grade {get; set;}

Type: Decimal

This field only applies to scheduling service appointments that don’t use Enhanced Scheduling and Optimization (ESO). Populated when scheduling a group of two dependent service appointments, also known as complex work. An asynchronous call is made to schedule both service appointments in the dependency group. This property contains the FSL__FSL_Operation__c ID.

public Id longOperationId {get; set;}

Type: Id

To learn more about scheduling dependencies and complex work, see Create Scheduling Dependencies Between Service Appointments.

To learn about Enhanced Scheduling and Optimization, see Get Ready for Scheduling and Optimization.

Relevant only when Limit Apex Operations is enabled in the Field Service Admin app. If the processing time of the ScheduleService is about to exceed the maximum CPU limits, partialResultsreturns the results that were already calculated and halts the process. This list contains the details of the partial, processed results.

public List<FSL.PartialResultsInfo> partialResults {get; set;}

Type: List<FSL.PartialResultsInfo>

The service resource assigned to the service appointment.

public ServiceResource serviceResource {get; set;}

Type: ServiceResource

The scheduled service appointment.

public ServiceAppointment serviceAppointment {get; set;}

Type: ServiceAppointment