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.

This was last published in March 2006

Dig Deeper on Lotus Notes Domino Agents

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close