You need to sign in to do that
Don't have an account?

How to get a button to change a custom field drop down?
I'm trying to get my custom button to change Lead Status to Converted in this script. Any help would be great!
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
sforce.connection.sessionId = "{!$Api.Session_ID}";
var E = new sforce.SObject("Lead");
E.id = '{!Lead.Id}';
// Replace below with your field.
E.To_Be_Set_Up__c=true;
// save the change
sforce.connection.update([E]);
//refresh the page
window.location.reload();
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
sforce.connection.sessionId = "{!$Api.Session_ID}";
var E = new sforce.SObject("Lead");
E.id = '{!Lead.Id}';
// Replace below with your field.
E.To_Be_Set_Up__c=true;
// save the change
sforce.connection.update([E]);
//refresh the page
window.location.reload();
Use this code .
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
sforce.connection.sessionId = "{!$Api.Session_ID}";
var E = new sforce.SObject("Lead");
E.id = '{!Lead.Id}';
// Replace below with your field.
E.To_Be_Set_Up__c=true;
c.Status = 'Converted';
// save the change
sforce.connection.update([E]);
//refresh the page
window.location.reload();