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
TheRealistTheRealist 

How to make a record to be submitted for approval automatically when met certain criteria?

Hi
lets assume a vf page(object),i have an object TEST with the field AMOUNTso whenever the new record is created or updated with value more than 300,000 in that field ,that type of records need to be subitted to a user(user email ) for approval automatically,can someone help how to achieve this. 
Best Answer chosen by TheRealist
KaranrajKaranraj
Using Lightning Process builder you can make the record automatically submit to the approval process whenever it meets the criteria. 
  • Go to setup->Create->Workflow & Approval->Process builder
  • Then select the object to which you want to perform the auto-approval submission
  • Enter the criteria for the record
  • In the set Action select 'Submit for Approval'
Check this blog post for the detailed steps https://rakeshistom.wordpress.com/2015/05/25/getting-started-with-process-builder-part-25-auto-submit-record-into-approval-process/

To learn more about Lighning Process builder check the salesforce Trailhead module - https://developer.salesforce.com/trailhead/force_com_admin_intermediate/business_process_automation/process_builder
 

All Answers

KaranrajKaranraj
Using Lightning Process builder you can make the record automatically submit to the approval process whenever it meets the criteria. 
  • Go to setup->Create->Workflow & Approval->Process builder
  • Then select the object to which you want to perform the auto-approval submission
  • Enter the criteria for the record
  • In the set Action select 'Submit for Approval'
Check this blog post for the detailed steps https://rakeshistom.wordpress.com/2015/05/25/getting-started-with-process-builder-part-25-auto-submit-record-into-approval-process/

To learn more about Lighning Process builder check the salesforce Trailhead module - https://developer.salesforce.com/trailhead/force_com_admin_intermediate/business_process_automation/process_builder
 
This was selected as the best answer
TheRealistTheRealist
thanks @karanraj ,but my requirement is not like the usual way of submitting records as you said,the entire thing has to be gone through my custom VF page and i have custom button on it.more over the records that met the criteria should be submitted for approval only when those type of records are created by sa particular owner as the owner of those records
KaranrajKaranraj
Whether you are creating from standard page or visualforce page the lightning process builder action will be initated once the record is saved in the database. If you like to programtically submit record into approval process check this post - http://www.jitendrazaa.com/blog/salesforce/dynamic-approval-process-based-on-the-apex-and-trigger/