本文介绍了ParameterDocID仅获得我的DocumentUniqueID的6位数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Javascript应用程序中调用特定的IBM Notes代理.从Javascript到Notes代理的调用带有一个参数.此参数是通用ID.

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.

不幸的是,我的代理仅获得我的通用ID(DocumentUniqueID)的6位数字.但我想拥有我的UniversalID的完整长度.缺少什么,有什么主意吗?

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?

我的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的完整长度.这没问题.

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

我的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获得了信息,该信息与仅接受noteIDrunOnServer有关.

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

由于不同副本中NoteId的更改,我想使用DocumentUniqueID做到这一点.我可以使用哪种方法,还有其他方法吗?

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?

推荐答案

Agent的runOnServer(String noteID)仅接受noteId作为参数,而不接受UniversalId.

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)

这篇关于ParameterDocID仅获得我的DocumentUniqueID的6位数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 19:56