?
Solved

Close Button

Posted on 2002-04-18
2
Medium Priority
?
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
vsaraogi earned 400 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

718 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