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
David_Adam_CoheDavid_Adam_Cohe 

Java Script to change a custom field

I want to add a button to the account page that changes two fields to a different value.
 
The two fields are dropdown menus.
 
what would the script look like to change the field from the current value to 'value x' for the custom button java script field?
 
Thanks
Dave
TCAdminTCAdmin
David,

You don't need to use JavaScript for this.  You can use a custom link which has the initial body of the following:

/{!Account.Id}/e?retURL=%2F{!Account.Id}& your data here &save=save

You would need to put in the information for the fields to be populated.  If you need instructions for this then you can go to my site where I have it in my solutions.