I created a web button with this code behind it
FIELD Promote_Status :=Promote_Status;
@SetField(“Promote_Status” ;“Yes”);
@Command([FileSave]);
@Command( [ToolsRunMacro] ; “(Promote)” )
The (Promote) agent contains this
Sub Initialize
Dim session As NotesSession
Set session = New NotesSession
Dim passageDb As New NotesDatabase( "Nlns901.eu.omron.com", "/europe/www/passage/ozoneeditmodule.nsf" )
Dim doc As NotesDocument
Set doc = session.DocumentContext
If ( doc.TopNews(0) ="Yes" ) Then
Call doc.CopyToDatabase( passageDb )
End If
End Sub
Never the less it is not working
I got this error in the log
01/30/2007 09:06:22 AM Agent ‘Promote’ error: Database /europe/www/passage/ozoneeditmodule.nsf has not been opened yet
The agent is running “on behave” of me and I have full access rights to all domino servers.
What Iam doing wrong ??
Many thanks in advance
Danny
Subject: On web not working on client it works
Danny,
Try taking off the first “/”
Ben
Subject: On web not working on client it works
Try this in your agent:
Dim session As NotesSession
Set session = New NotesSession
Dim passageDb As New NotesDatabase( "", "" )
Dim doc As NotesDocument
Set doc = session.DocumentContext
If ( doc.TopNews(0) ="Yes" ) Then
If Not passageDb.IsOpen Then
Call passageDb.Open("Nlns901.eu.omron.com", "/europe/www/passage/ozoneeditmodule.nsf")
End If
Call doc.CopyToDatabase( passageDb )
End If
Subject: RE: On web not working on client it works
hai danny
just try using "" instead of “/” in your new Notesdatabase()
function
for eg. see the code below
consider
the server is : Training
the database path is : Company\info.nsf
now use set db= new Notesdatabase(“Training”,“Company\info.nsf”)
or use session.getdatabase(“Training”,“Company\info.nsf”)
the session.getdatabase is more compliant with web applications. since i used it a lot over web.
also remember to use "" instead of “/” because it caused me problems which is similar to yours.
HTH
regards
VJ
Subject: RE: On web not working on client it works
Thanks Sai Maganti but it didnot work still getting this error in the log
01/30/2007 10:09:59 AM Agent ‘Promote’ error: Database /europe/www/passage/ozoneeditmodule.nsf has not been opened yet
I think I’m going to re-write the agent and scheduled to be running in the background in a custom view.