Creating a scheduled agent to change status of Lotus Notes documents after three months

Tags:
Lotus Agents
Lotus development
I want to create a scheduled agent that will change the status of a Lotus Notes document after three months. This agent should run every day, while checking and identifying the document's creation date. After the three months, it would change the document's status. Can anyone offer any ideas on how to get started on this?

Answer Wiki

Thanks. We'll let you know when a new response is added.

JellyBean: Aguirard had a better solution on a very similar question a while ago.

There are a few ways to do this.

the easiest is probably using a view that contains the documents you want to change the status of.

you view selection criteria would look something like this:

Select Form = “Your_Form_Name” & @days(@created) > 90 & Status != “Changed”

Where Status !=
This is the name of your status field and !=, not equal to, the status you propose to change it to.

This will display documents created more than 90 days ago.

Then run an agent over this view and change your status.

Your Agent code:

Dim db As New NotesDatabase( "Server Name", "Your database.nsf" )
Dim view As NotesView
Dim doc As NotesDocument
Set view = db.GetView( "your View name" )
Set doc = view.GetFirstDocument

While Not(doc Is Nothing)
Call doc.ReplaceitemValue("Status", "your new Status")

Set doc = view.GetNextDocument(doc)
Wend

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following