Solved

Closing a notesuidoc w/o save prompt.

Posted on 2000-03-31
4
336 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Doc.SaveOptions = 0  where "doc" is the "Background Class" document NOT the NotesUIDocument then you "close" the UI Document.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

10 Experts available now in Live!

Get 1:1 Help Now