Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • Lotus Notes and Domino Application Development wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.0
  • 6.5
  • 8.0
  • 8.5
  • 8.5.1
  • 8.5.2
  • 8.5.3
  • action bar
  • Agents
  • Ajax
  • app dev
  • Application
  • beginner
  • C&S
  • calendaring and scheduling
  • client
  • composite applications
  • Controls
  • converters
  • css
  • Custom controls
  • Data Binding
  • db2
  • design elements
  • dialog boxes
  • Documents
  • Dojo
  • Domino
  • Domino Designer
  • Domino Designer 8.5
  • DXL
  • Eclipse
  • error handling
  • errors
  • extensions
  • FAQ
  • Forms
  • formulas
  • getting started
  • globalization
  • Help
  • html
  • Installation
  • interface
  • internationalization
  • iPhone
  • Java
  • JavaScript
  • localization
  • Lotus Domino Designer
  • LotusScript
  • LotusSphere
  • LotusTechInfo
  • menu bar
  • Mobile
  • new user
  • Notes
  • Notes 8
  • notes.ini
  • NSD
  • OpenNTF
  • partial update
  • performance
  • Pickers
  • Portal
  • presentations
  • programming
  • Redbooks
  • Requested Articles
  • roadmap
  • rooms and resources
  • samples
  • Scripting
  • security
  • tabs
  • templates
  • themes
  • Tips
  • toolbar
  • troubleshooting
  • tutorials
  • validation
  • variables
  • video
  • VideoFest
  • View
  • view control
  • ViewPanel
  • Views
  • web
  • Web apps
  • Web services
  • webdev
  • XML
  • Xpage
  • XPages
  • XPages Extensibility API
  • xsp-config
  • データソース
  • 九州地区ノーツパートナー会
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > Programming > The third SaveOptions value, or How to suppress the "Do you want to save this document?" message box in Notes
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

The third SaveOptions value, or How to suppress the "Do you want to save this document?" message box in Notes 

expanded Abstract
collapsed Abstract
No abstract provided.
Yes, SaveOptions understands more than just "0" or "1":

Did you ever face the problem, that Lotus Notes keeps asking if you want to save the current document, even though you just did?

Picture the following scenario:

A user creates a document with a certain form that contains a "Change Field & Save" action with the following code:

' Action "Change Field & Save"
Sub Click(Source As Button)
    
  Dim ws As New NotesUIWorkspace
  Dim doc As NotesDocument
  Set doc = ws.CurrentDocument.Document
  Call doc.ReplaceItemValue("foo", "1")
  Call doc.Save(True, False, False)
    
End Sub


The user clicks the button "Change Field & Save", and then wants to close the document. What the user expects is, that the document simply closes, because he just clicked a Save-Button and did not change anything afterwards.

What actually does happen though is, that a prompt pops up: "Do you want to save this document?"

The reason is the item change (doc.ReplaceItemValue), even though it is processed before the doc.save.

To tell Notes that it should only ask when something was changed after saving the document, just add a SaveOptions field with any value other than "0" or "1". This also works with an empty string "". Or set the value of the item to "I added this item, so that Notes does not ask me unnecessarily if I want to save the document".


About the Author
Marcus Foerster works as Systems Architect for Pentos AG in Munich, Germany. His focus lies on the application side, creating collaboration systems for users, groups and enterprises to get their daily work done. This approach includes integrating complex workflows with intuitive user interfaces, using Lotus Notes/Domino with Adobe Flex and other Web technologies.
Read more in Marcus' blog: http://marcus.foerster.com/blog


expanded Article information
collapsed Article information
Category:
Programming
Tags:
SaveOptions Form

This Version: Version 1 March 29, 2010 7:59:43 AM by Marcus MF Foerster  

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (1)
collapsed Versions (1)
Version Comparison     
Version Date Changed by               Summary of changes
This version (1) Mar 29, 2010 7:59:43 AM Marcus MF Foerster  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use