
I need to show the error message while save the record from UI through plugin. I registered the Plugin in Pre-Operation.
I used throw new InvalidPluginExecutionException("custom message here"). But its showing the Error details along with the custom message.
Now I need to show only Custom message and don't want to show the error details in the alert. How can I achieve this?
TIA
*This post is locked for comments
I have the same question (0)It will show the custom message along with Generic business process error only if the error has been caught in the try catch. (guarded exception)
try {
/// your logic code here
}
catch (CustomException ex)
{
throw new InvalidPluginExecutionException("Unable to save the contact. This is likely caused by..."), ex);
}