Lisa J Vincent 29.Jun.09 10:53 AM a Web browser Domino Designer All Releases Windows XP
Within the past week, this problem has surfaced for several of our users.
I have an agent called from a form action. This agent creates a new document in another database from the current open document. Two weeks ago, this code was working. No updates or modifications have been made. However, two of my users state that when they click the action button, it looks like it is working, but no new document is created.
I've run it through debug and what seems to be happening is that the uidoc and doc are never set.
The code where the uidoc and doc are set is below. But it never get further than that before going to the OnError.
When I rem out the ErrorHandler, the error message is "Object Variable Not Set", which is obviously where the problem is.
Any ideas on what is going on?
On Error Goto ErrorHandler
Dim session As New NotesSession
Dim backdb As NotesDatabase
'dims for source
Dim ws As New NotesUIWorkspace
Dim db As NotesUIDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
'dims for target
Dim remotedb As NotesDatabase
Dim remotedoc As NotesDocument
Dim remotechild As NotesDocument
Dim continue As Boolean
Dim dateTime As New NotesDateTime( "" )
dateTime.LSLocalTime = Now
newdate = dateTime.DateOnly
'get handle to source
Set backdb = session.currentdatabase
Set db = ws.CurrentDatabase
Set uidoc = ws.CurrentDocument 'not being set
Set doc = uidoc.Document 'not being set