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
Rene EnglertRene Englert 

Create a visualfoce page to add a custom button to a custom object

I have absolutely no experience with Visualforce pages.  I have a custom object called Program Agreement.  When the fields are filled out on this page, I need to send them into an approval process.  I have created a custom button called Request Approval, but don't know how to add it to the Program Agreement object page.  Can anyone assist with the required code or can the standard Submit for Approval button somehow be added to my custom object?
Best Answer chosen by Rene Englert
Bhargavi TunuguntlaBhargavi Tunuguntla
Hi

This link matches your requirement to submit for Approval from VF Page:

Refer this link (https://developer.salesforce.com/forums/?id=906F0000000fzLvIAI)
 

All Answers

Bhargavi TunuguntlaBhargavi Tunuguntla
Hi

This link matches your requirement to submit for Approval from VF Page:

Refer this link (https://developer.salesforce.com/forums/?id=906F0000000fzLvIAI)
 
This was selected as the best answer
Sorna JenefaSorna Jenefa
Hi

This link is useful for your requirements pls refer it :
 
This link is using javascript
http://succeedwithsalesforce.com/custom-buttons-how-to-invoke-approval-process-and-conditionally-disableenable-them/
 
This link is using apex class
https://developer.salesforce.com/forums/?id=906F00000009FUiIAM
Thanks, 
Jenefa
Sweet Potato Tec 
Rene EnglertRene Englert
Thank you both for your response.  I was also working with an app from the AppExchange to generate a contract from my custom object.  I now have all of my required buttons in a functional state.