Lotus Agent

I have help desk DB, i want to create one agent which sends email to Help desk personal notifying them of the pending cases assigned to them. can any one help.
Who is Participating?
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
Ah, I see... The code isn't really yours...

In the Agents list, click New Agent; in the Properties window, enter a name for the agent, and at the bottom, set how you want the agent to run. If you start with the default settings, i.e. Action menu selection, set Target to None. Then in the Agent window, you have to change the Agent's type, from Simple action(s) to LotusScript. Then click on the Initialize-event at the left of the code-window.

You can replace the empty Initialize-event by the code you added above.
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

aib_itAuthor Commented:
Hi sysExpert;
Thank you very much for the post.
Can you please help me posting the following script into agent?
Like how to link the Help desk DB in the last lines?
Sub Initialize
      Dim session As New notessession
      Dim db As notesdatabase
      Dim view As notesview
      Dim doc As notesdocument
      Dim dc As notesdocumentcollection
      Dim TodayDateTime As notesdatetime
      Dim tmpdate As NotesDateTime
      Dim sec As Long
      Dim maildoc As notesdocument
      Dim Body As NotesRichTextItem
      Set tmpdate = New NotesDateTime( "" )
      Set db=session.currentdatabase
      Set view=db.getview("overview")
      Set TodayDateTime = New NotesDateTime( "Today" )
 'Messagebox( currentdate)
 'Msgbox Cdat(dateTime)
 'Check by a key with Interview
      Set dc=view.getalldocumentsbykey("Review",True)
      Set doc = dc.getfirstdocument
      While Not doc Is Nothing
 'Get values from columns
 'diffrence between two dates.
            sec = TodayDateTime.TimeDifference( tmpdate )
 'Msgbox sec
 'Msgbox balancedays
 'If the balance is more than one, send mail to interviewer.
            If (balancedays>1) Then
 'Msgbox "yes"
                  Set maildoc = New NotesDocument( db )
                  maildoc.Form = "Memo"
                  maildoc.Subject = _
                  "Reminder: Please Review New Application"
                  Set Body=New NotesRichTextItem(maildoc,"Body")
                  message="Please Review the New Application"
                  Call Body.AppendText(message)
                  Call Body.AddNewLine(2)
                  message1="Please Click here to open the Link=========>>"
                  Call Body.AppendText(message1)
                  Call Body.AppendDocLink(doc,"Please Click this Link to open the Document")
                  Call maildoc.Send( True, tmpname )
            End If
            Set doc=dc.getnextdocument(doc)
End Sub
Sjef BosmanGroupware ConsultantCommented:
Don't use maildoc.Send(True...) unless you really need to.

I can't really see a real problem with your code.
What's wrong with the code? Do you get any errors, in the log.nsf database?
aib_itAuthor Commented:
Thanks for thr reply.
Actually i wanted to know that how that once the new agent is created i have to put the code in the action section of the agent?
aib_itAuthor Commented:
Hi , I have created the agent,,, how this agent will understand to which email ID it has to send email. As this is help desk i need to identify only the support members.
aib_itAuthor Commented:
HI Guys;
One more request , can any one give me  post DB open code where email should be sent to admin upon accessing the DB...
aib_itAuthor Commented:
Let this case be open for some time as i am currently doing some testings.
aib_itAuthor Commented:
Dear Moderator;
Let this case be opened till i finish my testings.
aib_itAuthor Commented:
Dear Moderator;
Let this case be opened till i finish my testings.
aib_itAuthor Commented:
Wasnt got the solution i was looking for.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.