[SalesForce] Enforce user to populate field before submit for approval

I am new to approval process. I am trying to validate two custom fields as not blank before the approval process has been submitted. I have done some r&d and found that is to set that restriction in place with the help of the Entry Criteria[1] in the Approval Process. The User would be taken to another page wherein the Error Message would be displayed saying that the Record didn't meet the Entry Criteria and failed to enter into the Approval Process.

But my doubt here is during setting up the approval for those two required field that I wants to check. Who will be the approver that I need to set up what will happen if the criteria meets ? If criteria meets i.e. user has populated both the fields how will other approval process will get trigger?

Can anyone please help me to set this approval process.

Thanks

Best Answer

I am Jeff Du. We can't customize the displayed error message directly. We have to achieve it by coding.Now I can provide two solution for you.

Solution 1: Create a custom button with name "submit for approval",and execute javascript to validate the field value beforeto submit the approval approval process ;

Related resource:

https://developer.salesforce.com/forums/?id=906F0000000kF2JIAU

Solution 2: Create a custom button with name "submit for approval" , and redirect to a visualforce page to automatically submit the approval process and do the validation logic the in the related apex controller;