I am building a customized archiving agent with script. In it I want to walk through all of the documents I have selected in a view. I would like to use the db.unprocessedDocuments property to get a notesdocumentcollection (dc).
What I am confused about is that in the script, I first set the dc, then loop through the documents, checking some stuff before archiving each document. The only way I can get the agent to properly populate the dc is to set the agent to “RUN ON ALL SELECTED DOCUMENTS”.
If this is the case, will the agent run completely through its script for EACH ONE of the documents I have selected, which would be redundant at best, and will not find the documents still there since my script deletes the documents as it goes through its paces?
Maybe I am just missing something basic here. Can someone give me a hand? I can explain further if needed.
Thanks,
Matt