You need to sign in to do that
Don't have an account?
Célio Xavier
Prevent saving the email field with the apex class
I carried out a development that when the email field is changed in Salesforce, a Process Builder is triggered that according to some criteria calls a class that makes a callout to send data to an external service, it is working, but in order to implement it in production I need to deal code 500 that I receive if in case the external service is out, is there any way to prevent the saving of the email field according to the response of the external service request?
Yes, you can handle this in your apex code. Please see the sample code below
NOTE: The code provided is an example. You'll need to review and make modifications for your organization.
Let me know if it helps. If it does, please mark this answer as best. It may help others in the community. Thank You!