OpenNTF.org - Refresh All Views
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
Edit Document Code By Date > Code Document
About This Code
Brief Description:
Refresh All Views 
Rating:
Not Rated Yet 
Contributor:
Mike Mortin 
Category:
Lotusscript 
Type:
Miscellaneous 
Notes Version:
R6.x, R8.x, R7.x 
Last Modified:
11 Dec 2008 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
Sub RefreshAllViews(db As NotesDatabase)

' posted to http://www.openntf.org/Projects/codebin/codebin.nsf/0/C4BA0B2EC810D7EE8625751C0051534A
' written by Mike Mortin, 20081211
Dim s As New NotesSession

' use the current db if none is specified
If db Is Nothing Then set db = s.CurrentDatabase

' refresh all views
Forall view In db.Views
' Print "Refreshing view '" & view.Name & "'"
Call view.Refresh
End Forall
End Sub

Usage / Example
A great little piece of code to put in your Common script library. Refreshes each view in a database, handy after running an intensive script.
 Comments

No documents found

 Add your comment!