Solved

Code freezing system

Posted on 2006-11-30
3
215 Views
Last Modified: 2013-12-18
Have the code below in an agent, this agent is triggered by a button, the agent is set for selected docs and is triggered while in a particular record. It is sending the tracer needed, but for some reason it is freezing up my system. Is there something I have wrong in here which would freeze everything up like that.

Joe


Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim emaildoc As NotesDocument
      Dim Item As NotesItem
      Dim twoliner As String
      Dim rtitem As NotesRichTextItem
      Set db = session.CurrentDatabase
      Set col = db.UnprocessedDocuments
      Set doc = col.GetFirstDocument
      On Error Resume Next
      While Not doc Is Nothing
            If doc.input_flag(0)<>"done" Then
                  Set emaildoc = db.CreateDocument
                  emaildoc.form = "bb_input" 'Form name of Letter
                  emaildoc.SendTo = doc.EE_Name(0)
                  emaildoc.Principal = "Field Technology"
                  emaildoc.Subject ="Order for " +  doc.name_adjusted (0)+ " has been forwarded for processing."
                  Call emaildoc.Send(True)
                  doc.input_flag = "done"    'field name for flag
                  doc.status = "Order Input"
                  Call doc.Save(True,True)
            End If
      Wend
End Sub
0
Comment
Question by:jforget1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 18047880
your loop
While Not doc Is Nothing is always going run.

You need to exit somewhere !

I hope this helps !
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 500 total points
ID: 18047889
Add in a   doc = col.GetNextDocument(doc) before the Wend somewhere

0
 

Author Comment

by:jforget1
ID: 18047976
As always right on the money. Thanks for the help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question