Debugger Drops out on uidoc.close

Good Day All,

I am attempting to debug a chunk of code that is called as the second ui document that I am dealing with in a sequence.

The first sequence the debugger comes up and goes through all code as expected… I amend the doc and click my (Save & Exit) Action button and the debugger doesn’t load back up???

Has anyone else had an issue with this before? IS there a way to force the Debugger up? HELP?

Here is the first chunk of code before it fails out… (This section works and so does the next, but I can’t get the debugger up to figure out why the results are not as expected)

Sub Click(Source As Button)

'****************************************************************************************************************

'To Amend a Currently Approved Request

'****************************************************************************************************************

Dim db As NotesDatabase	

Dim session As New NotesSession

Set db = session.CurrentDatabase	

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim newuidoc As notesuidocument

Dim doc As NotesDocument

Dim newdoc As NotesDocument

Dim item As NotesItem

Dim tmpSaveOptions As String

Dim unidnew As String

Dim unidold As String

Set uidoc = ws.CurrentDocument

Set doc = uidoc.Document

Set newdoc=doc.CopyToDatabase(db)



unidold = Cstr(doc.UniversalID)

unidnew = Cstr(newdoc.UniversalID)



Set item = newdoc.ReplaceItemValue("ParentDoc", unidold)

Set item = newdoc.ReplaceItemValue("ThisDoc",unidnew)

Set item = newdoc.ReplaceItemValue("IsChild", "True")

Set item = newdoc.ReplaceItemValue("Approved", 99)

Call newdoc.Save(True, False)

Call uidoc.Close

Set uidoc = ws.EditDocument(True, NewDoc) 

End Sub

Subject: Debugger Drops out on uidoc.close

Ken,

The debugger won’t jump from one UI instance to another. The only way I’ve seen around this is to fill in your second form with the values you would expect your first UI would pass to the new doc, and run it through the debugger when you preview the form in Notes.

hth.

brandt

Subject: RE: Debugger Drops out on uidoc.close

Well doesn’t that just suck… This is a process of taking rejected, pending or approved docs, amending them and then re-submitting them… So of course I have no way to stop mid cycle to start a new instance and finish my amendments…

Damn you Notes(insert lotus Fist Shake here)

Thanks for letting me know…

If anyone has a workaround other then breaking my code apart… (it will be quicker to message the lines of code that are messing up versus create a new view and form to grab a doc in transition…)