How to remove the Suitelet page leave popup

The confirmation popup shows when the page leaves or reloads.

There are two main scenarios where the confirmation popup shows in suitelet:

  1. Page reloads through client script on fieldchnage
  2. Page reloads on custom button action

Add the following code snippet in the client script function.

if (window.onbeforeunload) {// to block the popup while reloading the suitelet page
                    window.onbeforeunload = function () {
                        null;
                    };
                }

Leave a comment

Your email address will not be published. Required fields are marked *