Issue Refresh of All Views in an Application/Database

Mindwatering Incorporated

Author: Tripp W Black

Created: 03/17/2011 at 06:08 PM

 

Category:
Notes Developer Tips
LotusScript

Issue:
You have some views you want to be periodically refreshed to make sure they are current.
Another possibility, which is the reason for creating this agent, is that we have a few yearly report views for some large applications whose indexes are thrown away (~250 days). Since we cannot set the index days field to over a year, we needed a work-around so the reports would generate in a few seconds rather than a half hour or more.

Solution:
In R6, we have the NotesNoteCollection which gives us the Note ID. We can get the view as document with the ID, but we cannot do db.GetView that way. So we get the view as a document, and then get's name, parse out only the alias part, and then get the view by title/alias, and finally call the view refresh.

RefreshAllViewsInApplicationR6.txtRefreshAllViewsInApplicationR6.txt


previous page