home
design & development
Lotus application development
print design
web site development
request a design quote
solutions & consulting
Notes and Domino application development
Lotus Domino administration
Securence Mail Filtering
UNITRENDS backup and recovery
Lotus Notes / Domino Apps
free Lotus Notes apps
hosting
web site hosting
Lotus application hosting
check your mail
request a hosting quote
publishing
media and publishing
sound
client services
help & support
Make Payment
Client Access - Workboard
billing & payment policies
copyright & liability policies
pricing & turnaround policies
privacy statement
contact
e-mail MW
get files
send files
Run Agent on New or Existing XPage Document After Save
Mindwatering Incorporated
Author: Tripp W Black
Created: 08/19/2010 at 02:30 AM
Category:
Notes Developer Tips
XPages
Issue:
You miss the WQS (WebQuerySave) agent capability and would love to further process or reuse old complicated workflow code.
Solution:
Add this script as a server side script after the save document event action.
var agent.NotesAgent = database.getAgent("myagent");
agent.run(datasourcename.getDocument().getNoteID());
Your LotusScript agent would get the the document via its session properties:
Dim s as New NotesSession
Dim db as NotesDatabase ' this db
Dim curAgent as NotesAgent ' current wqs agent running
Dim myDoc as NotesDocument ' document to process
' setup environment
Set db = s.CurrentDatabase
Set curAgent = s.CurrentAgent
Set myDoc = db.getDocumentByID(agent.parameterDocID);
...
previous page
×