Skip to main content
I have created a custom object called Demo (Demo__c). On here I would like to add a button which, when clicked, updates the Staus field (Status__c) to Completed. I currently have the below in place but it doesn't appear to be firing...

 

Behavior: Execute JavaScript

 

Display Type: Detail Page Button

 

OnClick JavaScript{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} 

 

{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")} 

 

var cseObj = new sforce.SObject("Demo__c"); 

 

cseObj.Id = '{!Demo__c.Id}'; 

 

cseObj.Status__c = ‘Completed'; 

 

sforce.connection.update([cseObj]); 

 

document.location.reload(true)

 

Can anybody help? Thank you!!!
4 respostas
  1. 31 de jan. de 2018, 11:38
    Thank you. Some has helped me away from the Community! 
0/9000