Hello,
my Problem is, that I got a NotesDocument, which I want to change and save through the use of an agent (which is running in the web)
Scenario:
I submit a form in the web, then my agent runs from the WebQuerySave Event
I have found the following Code all over the web:
-
Set session = New NotesSession
-
Set db = session.CurrentDatabase
-
Set subDoc = session.DocumentContext
-
subDoc.avCourseSeats=100
-
Call matchDoc.save(True, True)
I wanna do exactly the same through my agent, with the exception, that i get my Document from a view. (The Document is available, and i can Print field values and even change field value)
-
Set session = New NotesSession
-
Set db = session.CurrentDatabase
-
Set subDoc = session.DocumentContext
-
Set vw = db.GetView(“BEVCourseDatesID”)
-
Set matchDoc = vw.GetDocumentByKey(subDoc.RegCourseDateID(0))
-
matchDoc.avCourseSeats=100
-
Call matchDoc.save(True, True)
[av CourseSeats is a number Field]
wenn I replace line 7 through a "Print Cstr(matchDoc.avCourseSeats(0), I get the wanted value, but of course it is not saved.
When I Use the 7 lines of Code above My Browser only Shows “Document processed”
(because of insufficient Rights i am not able to run the web debugger for lotus Script.)
I hope someone of you can help me with that Problem.