i have to run an agent on web which set the status of current open document as well as the document which is alreadey saved my code is
Sub Initialize
'Dim wrk As New NotesUIWorkspace
'Dim uidoc As NotesUIDocument
Dim ss As New NotesSession
Dim db As NotesDatabase
Dim vw As NotesView
Dim doc As NotesDocument
Dim documentID As Variant
Dim doc2 As NotesDocument
Dim dc As NotesDocumentCollection
'Set uidoc=wrk.CurrentDocument
Set doc=ss.DocumentContext
Set db=ss.CurrentDatabase
Print "Connecting to Excel..."
documentID=doc.MainID(0)
doc.edit_doc="y"
Print "Connecting to Excel..."
'serielno=uidoc.Document.srlno
'Set doc=uidoc.document
Set vw = db.GetView("All feedback")
Set dc=vw.GetAllDocumentsByKey(documentID,True)
Set doc2=dc.GetFirstDocument
While Not doc2 Is Nothing
If doc2.status(0)="1" Then
doc2.status="Old"
Call doc2.Save(True,False)
End If
Set doc2=dc.GetNextDocument(doc2)
Wend
Call vw.Refresh
End Sub
when i calling agent on pressing a button then it shows the page cannot be displayed i got vary tanse what the problem where i did mistak please help me
As of my knowledge allways try to use following three Forms in your Database as you are developing Web based application.
1)$$ReturnAuthenticationFailure
2)$$ReturnAuthorizationFailure
3)$$ReturnGeneralError
You can get these Forms form Discussion db template. By Using these Forms you can track the reson of the error. It will diplay why the error came instead diplaying “Page can’t be displayed screen”.
When you run this agent through web, all the errors related to this agent will be logged into log.nsf. If you check these errors and post here we can help you better. Most of the errors are self explanatory. First check the errors related to this agent in log.