我从Javascript应用程序中调用特定的IBM Notes代理。从Javascript到Notes代理的调用带有一个参数。此参数是通用ID。
不幸的是,我的代理仅获得我的通用ID(DocumentUniqueID)的6位数字。但我想拥有我的UniversalID的完整长度。缺少什么,知道吗?
我的Java语言:
//more code before....
var UID = new String
UID$ = doc.getUniversalID()
// notes agent
var notesAgent = db.getAgent("NameOfMyNotesAgent");
// execute notes agent
var agentResult = notesAgent.runOnServer(UID$)
如果我输出我的UID,则为通用ID的完整长度。这没问题。
我的Notes代理(NameOfMyNotesAgent):
Dim agent As NotesAgent
Dim sess As New NotesSession
Dim db As NotesDatabase
Set db = sess.CurrentDatabase
Set agent = sess.CurrentAgent
Dim docUID As String
docUID = agent.ParameterDocID
'Display Notes document UID
Print "******************************"
Print "Notes Document UID: " & docUID
Print "******************************"
' I only get the last 6 part of the DocumentUniqueID, not the full one. Why?
编辑:
我从Knut Herrmann得到的信息与runOnServer
有关,后者仅接受noteID
。
由于不同副本中NoteId的更改,我想使用DocumentUniqueID
进行此操作。我可以使用哪种方法,还有其他方法吗?
答案 0 :(得分:3)
Agent的runOnServer(String noteID)
仅接受noteId作为参数,而不接受UniversalId。
因此,将代码更改为
var noteID = doc.getNoteID()
...
var agentResult = notesAgent.runOnServer(noteID)