Solved

Close Button

Posted on 2002-04-18
2
187 Views
Last Modified: 2013-12-18
I am developing an app in Notes and have a problem working out how to code the error checking.

What I am trying to achieve is to have two Actions available when editing a document. "Save&Close" will check the data is valid, and if so save and close the document without further prompts or messages. If there are errors, the user is informed, and the document is not saved.

Secondly a "Cancel" button that does exactly that, closes the document without saving any changes and without any other messages or prompts.

I can get this mostly working by coding the error checking in the Save&Close action, and then calling .Save and .Close for the UIDoc if there are no problems. The problem is the Cancel Action. When I call the UIDoc.Close action Notes displays a dialog prompting the user to Save the new document. If they click yes, the document is saved regardless of any problems.

How do I close an open document without saving and without prompting the user no matter what the state of that document? It could be a new document or an existing one, and there may or may not have been changes made.

Thanks
0
Comment
Question by:gbentley
2 Comments
 

Accepted Solution

by:
vsaraogi earned 100 total points
ID: 6952584
Hi gbentley,

You create one hidden field named "SaveOptions". Set the default value to "1". Remember, the field should be text field and type should be either "Editable" or "Computed when Composed". Now in the Cancel Action button, set the value of "SaveOptions" to "0" and call UIdoc.Close. It will close the document without displaying any Prompt.
Try it.

Vsaraogi
0
 
LVL 5

Author Comment

by:gbentley
ID: 6952601
Great. Now the trick question, where do I find this sort of thing in the docs?

Thanks
Gordon
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question