function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SeannoSeanno 

How do I make a button change a field

Is there a way to make a button change what is in a field?  Like a button that labeled "Send Order" to change a field with a drop down list of "1,2,3,4" of 1 as the default to 4.  Pressing the button would change the field from 1 to 4.

 

Thanks,

Sean

RpeeRpee

Assuming this was a button on the Opportunity and the Picklist field's Id is 00N80000003FZMf

 

/{!Opportunity.Id}/e?save=1&00N80000003FZMf=4&saveURL=%2F{!Opportunity.Id}

 

1 click to change a value on the record you're currently on.

SeannoSeanno

How do I find the Picklist field Id?

RpeeRpee

Visit the actual field on the object, like if you wanted to change the field name. It will be the 15 character id in the URL box.

SeannoSeanno

Perfect, thx.

max4904max4904

Where does this code get placed? I assume you are talking about setting the Behavior of the button to Execute JavaScript and this the OnClick JavaScript code that gets executed by the button.  Please confirm?  Thanks!