Q
Problem solve Get help with specific problems with your technologies, process and projects.

How to refresh all Lotus Notes documents via a background agent

SearchDomino.com expert Brian Mahoney helps a Notes/Domino programmer select a method to refresh all documents in a Lotus Notes database via a background agent.

I need to refresh all the documents in my Lotus Notes database via a background agent. When I try to use the @Command()...

in the agent with a target of all database docs, the agent counts through them all -- but shows this error message:

Formula Error: @Command and other UI functions are not allowed with this type of search; please select None.

When None is selected, it comes back with 0 found. I assume there must be another way to do this. Do you have any suggestions?

I'm not certain what you want to do when you 'refresh' the documents. If you want to recalculate the values in a form for each document, you can use the doc.ComputeWithForm method to recalculate each document with the appropriate form, and then save the document. Beware of this method though, because all validation formulas will also be triggered; and if there are errors, it will cause problems.

The best thing to do is to create the code to walk a view of the Lotus Notes documents that need to be 'refreshed,' and perform the needed calculation. For example, if you have a field on a document called DaysOpen, our agent could walk the view of open documents and perform the calculation on the appropriate documents.


Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on Lotus Notes Domino Agents

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close