You need to sign in to do that
Don't have an account?
Build a new Button to update a field
Hi All
Was looking for some tips on building a new button to update a field in Salesforce.
Something like...Button called 'Make this Contact NEW', and when clicked that Contact record Status field is updated to 'NEW'.
Done these before but I can not find my cheatsheets??
Many thanks in advance!!
Phil
Hey Phil,
Add following JS code in your button,
Just update the code accotding to which field to update with value needed.
Hey Rahul
Thanks for your response!
Could you highlight which parts I should update with the field name and the custom object name?
Much appreciated!
Phil
BTW, here is the attempt I made it tweaking your code...
Note the custom object is called "Fulfilment"
The custom Field I want to change is called "Ready to Proceed" (it is a checkbox)
And I want to change this field to be True (i.e. ticked).
{!REQUIRESCRIPT("/soap/ajax/23.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/23.0/apex.js")}
var Fulfilment = "{!Fulfilment__c.Id}";
var objFulfilment = new sforce.SObject('Fulfilment__c');
objFulfilment__c = Fulfilment;
objFulfilment__c.Ready_to_Proceed__c = "True";
result = sforce.connection.update([Fulfilment]);
location.reload(true);