I have posted a topic before and it wasn’t quite “User Friendly” to all you people out there who help simpleton’s like myself.
I have got past some problems due o some peoplehelping me.
I have now got this coding which deletes a document in Lotus Notes, but it doesn’t work on the web.
Any reasons?
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
hm = collection.Count
For j = 1 To hm
Set doc = collection.GetNthDocument(j)
Call doc.Remove(False)
Next
Reasons: UnprocessedDocuments property does not give you the current document in a web agent. If this is a Webquery… agent, use DocumentContext.
If it’s a normal agent, it’s invoked with a URL, e.g. …/yourdb.nsf/CrunchDoc?OpenAgent. The server has no way to know what document is currently displayed in your web browser window. You would have to supply this information on the URL. The agent would use the CGI variables in the conext document to read the URL information and act on it.