Webquerysave agent not starting

Please help. I have a webquerysave agent that is in a child document. I am trying to get the value of a field in the child document written to the corresponding field in the parent document. When I test the code in the client, it works fine. When I try to run it on the web, it doesn’t work. It’s almost appears as if the agent doesn’t even start. I have tested the form without the webquerysave and it works fine. Any thoughts on what might be preventing it from running?

Thanks in advance.

Dim session As New NotesSession

Dim db As NotesDatabase

Dim child As NotesDocument

Dim parent As NotesDocument

Dim attach As NotesItem

Set db = session.CurrentDatabase

Set child= session.DocumentContext

Set parent = db.GetDocumentByUNID(child.ParentDocumentUNID)

Set attach = child.GetFirstItem( “AttachmentKey” )

Call attach.CopyItemToDocument( parent, “AttachmentKey” )

Call parent.Save( True, True )

Subject: Webquerysave agent not starting

Hi,What are the runtime properties for your agent? I mean Target, Agent List Selection etc…

Regards,

Munish

Subject: Webquerysave agent not starting

Laverne,

Do you have the agent specified in the webQuerySave event? If so, then start by just putting a print statement at the beginning like so …

print “agent starting”

exit sub

This way you know whether the agent is kicking off or not. You can then troubleshoot from there by using print statements or other methods.

reqards,

raphael

Subject: RE: Webquerysave agent not starting

Thanks for your help. As it turns out, I had overlooked the runtime selections. This is what was causing the agent not to run.

It is working fine now.

Laverne