You need to sign in to do that
Don't have an account?
prathibha kr
How to add try catch error message using trigger
Is it possible to show the try catch error message from trigger to record page. So that proper error message will be visible for user
If your trigger is invoking from Standard record detail page then you use "sObject.addError(<Message>)" method to show an error.
Refer to following code snippet -
This error would be specific to sObject record however if you want to use try catch block then you can throw a custom exception and attach it to the specific sobject record.
Do post here if you have any further questions.
Happy Coding!!