0

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.

1 Answer 1

0

You may try toasts. I used them to show messages on a redirect from visualforce page to the list view.

sForce.one.showToast({“title”: “Error” ,  
                      “message”: “Id not Found”,
                      “type”: “error”
                    });

Here is a simple article.

You must log in to answer this question.

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