ParameterDocID gets only 6 digit of my DocumentUniqueID

眉间皱痕 提交于 2019-12-13 00:26:30

问题


Im calling from my Javascript application a specific IBM Notes agent. The call from Javascript to Notes agent happens with a parameter. This parameter is the Universal ID.

Unfortunately, my Agent gets only the 6 digit of my Universal ID (DocumentUniqueID). But I would like to have the full length of my UniversalID. What is missing, any idea?

My Javascript:

//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$)

If I output my UID, its the full length of the Universal ID. This is no issue.

My Notes Agent (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?

Edit:

I get the information from Knut Herrmann that this has to do with runOnServer which only accepts noteID.

Due to the NoteId changes in different replicas I would like to do this with DocumentUniqueID. Which way could I use for this, is there an alternative way?


回答1:


Agent's runOnServer(String noteID) accepts only the noteId as parameter, not the UniversalId.

So, change your code to

var noteID = doc.getNoteID()
...
var agentResult = notesAgent.runOnServer(noteID)


来源:https://stackoverflow.com/questions/55517545/parameterdocid-gets-only-6-digit-of-my-documentuniqueid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!