使用 Lotusscript 将参数从 Database1-Agent 传递到 Database2-Agent

Passing of parameter from Database1-Agent to Database2-Agent using Lotusscript

请问是否可以使用代理从Database1传递参数(例如:fieldA和fieldB值),并触发Database2-agent接受传递的参数?

不确定是否可行。谢谢!

有一个 - 部分未记录 - 的函数可以将完整的内存中文档传递给代理而不保存它。这样你就可以将任何东西从一个代理传递给另一个代理。但它只有在一个代理呼叫另一个时才有效:

Dim ses as New NotesSession
Dim db2 as NotesDatabase
Dim agent2 as NotesAgent
Dim docTemp as NotesDocument

Set db2 = New NotesDatabase( "Server", "db2Path.nsf" )
Set agent2 = db2.GetAgent( "NameOfAgent2" )

Set docTemp = New NotesDocument( db2 )

docTemp.Parameter1 = "Some string"
docTemp.Parameter2 = "Another String"
docTemp.AnyNameYouWant = 3

Call agent2.runWithDocumentContext( docTemp )

然后在代理二中访问文档,如:

Dim ses as New NotesSession
Dim docTemp as NotesDocument

Set docTemp = ses.DocumentContext

param1 = docTemp.Parameter1
param2 = docTemp.Parameter2
numParam1 = docTemp.AnyNameYouWant