I have a custom object: Ticket__c

In that object I added a custom button, and I want to update an attribute of the object (Escalate__c) from false to true, I am not sure how to do this right now I have something like this:

var result = sforce.apex.execute("evticket__c" : true);


1 Answer 1


Your JavaScript isn't quite right, but unless you've written a method for this, it'd be easier to update the record directly:

var record = new sforce.SObject("Ticket__c");
    record.Id = "{!Ticket__c.Id}";
    record.Escalate__c = true;
var result = sforce.connection.update([record]);
// check the result here
  • Thanks, this worked. I was so lost on the syntax, sorry. lol Jan 22, 2015 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.