Submitted by Yan N VALIDE on Mar 2, 2012 5:50:44 AM

Re: XPages and Calling Agents Using an In-Memory Document

Here a workaround for executing background agent on behalf of the real user:

dim eval as string

dim res as variant

dim username as string

Dim s As New NotesSession

Dim db As NotesDatabase

dim doc as notesdocument

Dim ag As NotesAgent

Dim noteid As String

Set db = s.CurrentDatabase

Set ag = s.CurrentAgent

noteid = ag.ParameterDocID

Set doc = db.GetDocumentByID(noteid)

eval={@username}

res=Evaluate(eval,doc)

username=cstr(res(0))

here is the real username.

Donct forget to thick in the agent security properties that it can be run on behalf of web user.

Submitted by sean cull on Sep 7, 2010 3:15:44 PM

XPages and Calling Agents Using an In-Memory Document

Its a shame that it cannot run the inner agent in the name of the signer on the web.

The use case I have in mind is chedking to see if an account already exists in an anonymous registration process