Refreshing All Documents

Depending on database design changes, you may need to refresh all documents stored in the database for the change to be applied. For example, say a new computed field is added to the form. For the change to be visible, each document in the database needs to be opened and saved. This routine illustrates how to create an agent that automatically refreshes all documents in the database.

How It Works

Using the ToolsRefreshAllDocs command, every document in the database can be refreshed and saved.

Implementation

To implement this solution, perform the following steps.

Step 1.

From the Domino Designer, open the database and select the Create > Design > Agent menu options. Name the agent Refresh all data (see Figure 18.13). Because this agent will affect every document in the database, consider changing the agent from Shared to Private. When this option is selected, only the author of the agent will have the ability to see the agent from the Actions menu.

Figure 18.13. Property settings for a private agent


Step 2.

Change the Language Selector from Simple action to Formula and insert the following in the Programmers pane.

@Command([ToolsRefreshAllDocs]); @All




An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management

Security

Application Deployment and Maintenance

Troubleshooting

Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net