Apologies, this is a hard one to present any code for, since I don't know where to start and the Salesforce documentation does not appear to give any kind of answer to this.

When a ServiceAppointment is scheduled and then viewed in the FSL Gantt chart, you can see a representation of the travel time required to attend that appointment.

Is there any way of retrieving these values / records in Apex? Of seeing when a ServiceResource is unavailable due to the fact they are travelling?

1 Answer 1


Yes, there is.

You can get to this via the AssignedResource record that links the ServiceResource and ServiceAppointment.

It is available in the field EstimatedTravelTime, which represents a number of minutes.

For example, if you had the Id of the ServiceAppointment, you could:

SELECT EstimatedTravelTime
FROM   AssignedResource
WHERE  ServiceAppointmentId = :id

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .