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
marianoa82marianoa82 

Validate Data before Submit Into Approval Process

Hi!..I have a requirement. Before submitting a record into an approval process, I need to validate some information in others records..if the validation fails, I need to send a warning to the user…if it’s ok, the approval process is fired.
Any idea in order to achieve the requirement? I’m lost here, any kind of help is welcome.
Best Answer chosen by marianoa82
Vijaya Kumar RegantiVijaya Kumar Reganti
HI Marianoa,

You need to go for a custom button with VF or Javascript button to submit for approval.
and you can use apex to initialize the approval process.
Find an example here.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_example.htm

Best Regards,
Vijay
 

All Answers

Vijaya Kumar RegantiVijaya Kumar Reganti
HI Marianoa,

You need to go for a custom button with VF or Javascript button to submit for approval.
and you can use apex to initialize the approval process.
Find an example here.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_process_example.htm

Best Regards,
Vijay
 
This was selected as the best answer
marianoa82marianoa82
Thanks for your help Vijay!