[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Code freezing system

Posted on 2006-11-30
3
Medium Priority
?
218 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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

656 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