I have page reference method written on click of "Save" button. I need to refresh one page after click of Save button when in console and not when in standard Salesforce.

 PageReference pr = new PageReference('/apex/VisualforcepageName?Id='+idAccount+'&isdtp=vw');
    return pr;

How can we check in Apex whether button was clicked when in Console?

Thanks in advance.

1 Answer 1


Change the save method on the source page to an onclick event instead of an action. Then use a JavaScript method to check inconsole and depending on result pass different or additional parameter to the controller to evaluate on your actual save method execution.

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.