Solved

Close Button

Posted on 2002-04-18
2
182 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
Comment Utility
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
Comment Utility
Great. Now the trick question, where do I find this sort of thing in the docs?

Thanks
Gordon
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now