ServiceAppointment is a Standard object when you enable Field Service settings. I used the below code in Java Script Button.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var __sfdcSessionId = '{!GETSESSIONID()}';
var stc = new sforce.SObject('ServiceAppointment');
stc.id = '{!ServiceAppointment.Id}';
stc.Status= 'Arrived on site';
alert(stc);
var result = sforce.connection.update([stc]);
alert(result);
window.location.reload();
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', }