I am trying to create a custom button on a detail page that updates a field on the record. Here is my code:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
var newRecords = [];
var idLob = new sforce.SObject(“Idea_Lobby__c”);
idLob.id =”{!Idea_Lobby__c.Id}”;
idLob.Vote_Test__c =(’Up‘) ;
newRecords.push(idLob);
result = sforce.connection.update(newRecords);
window.location.reload();
I get an illegal token error. Any ideas on what's going wrong? Also, can I call this button from a command button in a HTML visualforce page?
Thanks!