.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: Refresh method
1. This agent displays the top level entry count for an uncategorized view three times: before creating a new doc that appears in the view, after creating the document but before refreshing the view, and after refreshing the view. The count is the same in the second display and incremented in the last display.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set db = session.CurrentDatabase
Set view = db.GetView("All")
Messagebox view.TopLevelEntryCount,, "Before new doc"
Dim doc As New NotesDocument(db)
Call doc.ReplaceItemValue("Form", "Main Topic")
Call doc.ReplaceItemValue("Subject", "New document")
Call doc.Save(True, True)
Messagebox view.TopLevelEntryCount,, _
"After new doc, before refresh"
Call view.Refresh
Messagebox view.TopLevelEntryCount,, _
"After new doc, after refresh"
End Sub
2. This agent creates a new document that appears in a categorized view. The document is not accessible to any NotesView methods until the Refresh method is called.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim newDoc As NotesDocument
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView( "By Category" )
' create a new document with Latest news category
Set newDoc = New NotesDocument( db )
newDoc.Form = "Main Topic"
newDoc.Categories = "Latest news"
newDoc.Subject = "Just created this doc"
Call newDoc.Save( True, True )
' try to get first document in Latest news category
Set doc = view.GetDocumentByKey( "Latest news" )
' even though doc is saved, it doesn't appear in view yet
If ( doc Is Nothing ) Then
Messagebox( "Refresh the view" )
End If
Call view.Refresh
' after refresh, try again
Set doc = view.GetDocumentByKey( "Latest news" )
If ( doc Is Nothing ) Then
Messagebox( "Something's wrong" )
Else
Messagebox( "Now that view is refreshed, doc appears" )
End If
End Sub
See Also
Refresh method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents