I have different approval processes on the same object and of course they require a different combination of entry criteria.

However, all of them share the fact that some fields are mandatory for the submission. If I add them to the list of entry criteria there will simply be no available Approval Process. What I want is to block the submission of approval and display an alert that inform the user of the missing fields.

What Salesforce feature do you suggest?

1 Answer 1


One route is to use record types to control whether the submit for approval will be shown. If you have a lot of types of submissions, then this would be a bad way to go.

A route I have went is to create a specific actions on the record for the type of approval with required fields and then have a specific hidden field that triggers process builder. This works very well, but as you start have a lot of approvals, it can get busy.

Another route is to use visual workflows. It is both classic and lightning approved. You can have them give input and require fields. You can then submit for approval after completion of the flow.

  • I don’t like the first one because I think that records should have other purposes and because I want the button always visible. What should happen when I click the button is the appearance of the alert.
    – gvgramazio
    Commented Mar 22, 2019 at 17:56
  • The second one is almost what I’m trying right now: a quick action that calls a lightning component that in its apex controller checks if the fields are populated and either call the approval process or display the alert.
    – gvgramazio
    Commented Mar 22, 2019 at 17:59
  • That is a custom button. I don't know if you are on Classic or lightning, but if lightning, I would create a custom action with required fields. Then after they have all fields, the click save and PB will send to approval. You then have to hide all submission buttons including on list view. This is how I do it. If you have classic, you can do a javascript button but those are not best practice anymore. The script could look for fields based on JS and then give an alert or forward to the normal submission button. I have done the latter and hated it. Commented Mar 22, 2019 at 18:00
  • I don’t personally dislike the third option. But it requires the user to go through a visual flow. Personally, it’s the best solution and use experience, however it doesn’t meet the requirements of the clients.
    – gvgramazio
    Commented Mar 22, 2019 at 18:02
  • You don't have to do a custom component in an action if you use PB or Visual Workflow. But if you you are creating a lightning component, what part is holding you up? is the amount of code or just curious if easier way? It can be done this way. I have an eval process that has a confirmation page and checks for errors before giving the option to submit. Then sends to PB. I do this so I can have several approval processes but one button. Let me know where you are hung up at. Commented Mar 22, 2019 at 18:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .