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
bheemudu neelibheemudu neeli 

How to add a Date to confirm a Invoice approve on VF page

Hi All,
Please Help me to add a Date on below screen, Date field need to select on same page, so that Invoice should be Approve.
It will be done on VF page or else on controllers? need a help on below, its urgent.
User-added image
 
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Bheemudu,
  • The "Submit for Approval" action can be done through Apex. You can have an Apex Controller Method that does the Approval Submission action for that Particular Object, and place this action behind a Command Button on the VisualForce page.
  • The following link provides an example as to how to trigger an Approval Process on Account through Apex Code.
  • http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm
  • And the current Stage of the Approval Process can be found out from the "ProcessInstance" SObject.
  • This "ProcessInstance" SObject contains Fields TargetObjectId and Status which denote the Object on which the Approval Process is, and Status of the Approval respectively.
Hope it will be helpful.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
 
bheemudu neelibheemudu neeli
Thanks for your reply Rahul,
Actually its not a Approval Process here, but my button goto VF page and from their I can click Ok to proceed further, but my requiremnet is before click on 'OK' I need to select a Date field on same page, so that I can proceed further.