Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Close Button

Posted on 2002-04-18
2
Medium Priority
?
194 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 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses

886 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