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

Custom Button Field Update
I want a custom button (on a custom object) to execute a field update. The button is called "Vote" and the field is a number field called "Votes". The pressing of the button would increase the value of the Votes field by 1.
Can anyone help me in this case?
Bacon,
You have a couple of choices. You can create a custom button, write some javascript that runs when the button is clicked. Or you can write a Visual Force page with a custom Apex controller that does the update.
John
Technical Instructor
Salesforce.com
All Answers
Bacon,
You have a couple of choices. You can create a custom button, write some javascript that runs when the button is clicked. Or you can write a Visual Force page with a custom Apex controller that does the update.
John
Technical Instructor
Salesforce.com
Bacon,
Take a look at the Cookbook http://wiki.developerforce.com/index.php/Force_Platform_Cookbook
There is an example called "Creating a Button wth Apex". It may give you some ideas for your requirements.
Hi
Is this code still available as the link does not work now. I also want to build a Button which updates a field on a record. I am sure it is easy but my first tries still error. Many thanks!
Phil