Solved

Closing a notesuidoc w/o save prompt.

Posted on 2000-03-31
4
342 Views
Last Modified: 2013-12-18
Hi
When I try to close a notesuidoc it prompts the user if they want to save the doc before it is closed even though I save the doc in the script.  Is there a way around notes giving the user this prompt?  Sorry I only have 18 points to give :~(
0
Comment
Question by:sbaek
4 Comments
 
LVL 6

Expert Comment

by:ghassan99
ID: 2672616
Create a hidde field on the doc and name it 'SaveOptions' and set its default value to 1.

-Gus
0
 
LVL 7

Expert Comment

by:Z_Beeblebrox
ID: 2673211
What Gus has said works assuming you always want to save the document. But if you only want to save it conditionally, then your script needs to save the document. Without knowing what your script is doing, it is hard to say why it is not saving the document properly. One suggestion I can make though is that if you are using @commands then try using @postedcommand for the file save.

Zaphod.
0
 
LVL 2

Accepted Solution

by:
mchampou earned 18 total points
ID: 2681400
Try the following :

If you need to save the doc before closing it, use the UIDoc method "Save"

then call the UIDoc method "Close".

If you don't want to save the doc before closing it, you can do the following :

with the NotesDocument, call the replaceitemvalue method with the following parameters:

Call Doc.ReplaceItemValue("SaveOptions", "0")

Then call the UIDOC.Close method.

Give it a shot :-)

mchampou
0
 
LVL 1

Expert Comment

by:roosterup
ID: 2689949
Doc.SaveOptions = 0  where "doc" is the "Background Class" document NOT the NotesUIDocument then you "close" the UI Document.
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…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…

713 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