ServiceAppointment is a Standard object when you enable Field Service settings. I used the below code in Java Script Button.


var __sfdcSessionId = '{!GETSESSIONID()}';

var stc = new sforce.SObject('ServiceAppointment');
stc.id = '{!ServiceAppointment.Id}';
stc.Status= 'Arrived on site';
var result = sforce.connection.update([stc]);

When I click on button its showing the below error but its working with Account object.

{errors:{message:'sObject type 'ServiceAppointment' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', statusCode:'INVALID_TYPE', }, id:null, success:'false', }

1 Answer 1


ServiceAppointment object is available in API version 38.0 and later.

So, use


You must log in to answer this question.

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