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.

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.