Problem in Agent

Hi All, I am writing the agent for saving document in web.

Its not working.

Field name:- nm11

Error:- Agent Save Illegal use of PROPERTY**

Please guide me.

    Dim s As New NotesSession

Dim db As NotesDatabase

Dim udoc As NotesDocument

Dim doc As NotesDocument

Set db=s.CurrentDatabase

Set doc=New NotesDocument(db)

Set udoc=s.DocumentContext

nam=udoc.nm11(0)

    doc.nm11=nam

Call doc.Save(True,True)

Subject: Problem in Agent

The agent works fine. Try to make a new database and create a new agent using this code there.

Subject: Problem in Agent

Dear Pawan,

try this .

Dim s as new NotesSession

Dim db as NotesDatabase

DIm uidoc as Notesdocument

DIm doc as Notesdocument

set db=s.currentdatabase

set uidoc=s.DOcumentcontext

val=uidoc.nm11(0)

Set doc= new Notesdocument(db)

doc.form=“New form name”

doc.nm11=Cstr(val)

Call doc.save(true,true)

ur mistake was :–

  1. U did not diclare Session class

  2. when u want to compose new document then why u did not diclare form name .

  3. always use error handling , it will help u to finding error line no.

RIshi

Subject: RE: Problem in Agent

Hi Rishi, It’s Working.The MAin Problem was in Agent Properties.

Set Runtimr Security Level.

Previously It was 1.

Now I setted it 3rd Number.

Its Working Well

Thx For the Response

PAwan