You need to sign in to do that
Don't have an account?
Custom button that sets a numeric field value
Hi, I have an app that needs to have a button next to Edit and Delete and Save that changes a field value of the record viewed to '11'.
So far I have this:
Seems like it should be easy.
So far I have this:
<apex:commandbutton value="----- Mark Complete-----" action="{!RPP_Tracker__c.Present_Dept_Number__c = 11}" />I know this won't work because it's not actual referencing any specific record, simply the custom object field, but how do I change this to get the custom button to grab the existing record that is displayed on the page on which is presently being viewed?
Seems like it should be easy.
Try below javascript code in your custom button and let me know if it works.
Best Regards,
-Vivek
All Answers
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_methods.htm
Try below javascript code in your custom button and let me know if it works.
Best Regards,
-Vivek