locked
can I control the dialog "To stay on the page so that you can save..." RRS feed

  • Question

  • I'm supporting an app where the developers created a dialog box in js that mimics completing of things like orders and opportunities; in this case it is firing from activity forms.  It acts upon the state of related, custom entity records -- a set status button on a grid on an activity.  It works but only when the user makes the counter-intuitive selection of "OK" (OK to abandon changes.)

    Worse than that, having selected "OK" the user has now put the activity form in a state where it can be lost.  Navigating away from the unsaved activity no longer warns of the impending doom of the record just entered.

    1. Most importantly, can I "re-activate" the warning dialog so the users would have to click "OK" again to lose the activity?
    2. And/or can I trap the event to keep the initial warning away from the user and act as if "OK" was not clicked and still get out of the dialog?

    I hope that makes sense.

    Wednesday, March 4, 2015 5:50 PM