Solved

Close Button

Posted on 2002-04-18
2
185 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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