I am trying to refresh all @DBLookup/computed values within a document using a scheduled agent.
Manually, this does the job: @Command([ToolsRefreshAllDocs])
I have tried using the LotusScript below, too, but this doesn't seem to work either:
If doc.computewithform (True, False) Then Call doc.save(True, False)
Do you have any suggestions?
ComputeWithForm does work with @DBLookup as well as other computed fields, but you have to consider the different context of code running on your workstation versus on the server. The current username is the server name rather than yours, and if you want to refer to a database on the current server, you should use "" in your formula rather than a hard-coded server name. To write a formula that will work both on the server and on a workstation, use "" to refer to the current database, or if to another database on the same server, use @Subset(@DbName; 1) : "filepath", or use the replica ID of the second database.
If the database is on another server, you may need to make sure there's a "trust" relationship between the servers. The Server configuration document of the second server in the server address book contains a field on the Security tab labeled "Trusted servers." It should list the server running the agent.
Do you have comments on this Ask the Expert Q&A? Let us know.
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.