Solved

Code freezing system

Posted on 2006-11-30
3
211 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now