Hi I'm trying to display error message which is sending by external system (Not from salesforce) and at the same time i want to redirect to another page. Here is my code.
else
{
if(error.contains('MCF Quote is Not Allowed')){
this.addMessage(ApexPages.Severity.ERROR, 'Error Occured processing the request ['+error+']');
result = 'redirect';
return result;
}
I want to both condition to perform, Showing error message and redirect. Here in this code error message only showing up or redirect is happening without showing error message , Could someone help me to rewrite code to perform both.