I have a script on layout exit; which basically alerts user existing record without saving. If user edit some field and try to go back; message pop up asking user to save or not.
I also have a button on the layout; record will will only be saved if user click save. And once saved the record, they will be taken to different layout.
All works fine..
The problem is when user click save, they still see the message "Do you want to exit without saving" and obviously that because I got a script on layout exit.
So my question is how I can prevent on layout exit running f user click save button. Is there any script line which prevent another script from running.
in the script that triggers on layout exit, check to see if a global variable value exists. Set the variable to contain a value when clicking on "save"... just don't forget to clear the variable when done.