Hi,
How can I know via srcipt is the user has cliked on Yes to save or No leave without saving?
thanks
A,
Hi,
How can I know via srcipt is the user has cliked on Yes to save or No leave without saving?
thanks
A,
Subject: Couple of ways to do this
Hello. I can think of two ways to approach this problem and it depends on whether you need to store what the user did for later reference. If you need to upon close or save of the form, determine if the user clicked the save button then you can declare a global variable on the form, set that global variable in the form Queryopen event to specific value then set the global to a value based on what button was clicked. This type of coding scheme is outlined in the Technote “How to Use LotusScript to Force Users to Use an Edit Button Rather than Edit Menu Command.”. If you need to store which button the user clicked, then you can set a save a flag value via the backend document object. Let’s say in the buttons you have code that get’s a handle to the current document in a set doc=uidoc.document statement. Before the save in the Save button, you can just perform a doc.clickedsavebutton=“Yes” and then you will perform your save. After the document is closed then you can examine this field to see if the user saved the document using the button. If this flag is not set, then you know they clicked the other button.