0

Please advise, I'm writing custom logic like: 'User cannot close an Opp if it has no OppContactRoles'

Does anyone know if there is an action in Process Builder to stop a record from updating? Preferably with an alert similar to apex .adderror() method.

I cannot use a custom Validation rule on my Opp because the logic depends on OppContactRoles (which allow no triggers and no standard Rollup to Opp) so I plan to rollup(count) oppContactRoles using a PB. Problem is- validation rules run before a PB. Also I like to keep logic in one place, so saving writing a 'Before' trigger as a last resort. Thanks!

1
  • 1
    I think the only way you can do this currently is to write some Invocable Apex and throw an .addError() based on the conditions you are looking for Commented Nov 18, 2019 at 15:20

1 Answer 1

1

I found an old explanation: https://developer.salesforce.com/forums/?id=906F00000005FUoIAM Apparently this one does not have a solution, as it is not possible to invoke Apex .addError() from inside a process builder. Being too deep in the dream within a dream.

You must log in to answer this question.

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