
Project: XPages Extension Library (Managed by Philippe Riand, Niklas Heidloff, Dave Delay, Akihiro Kosugi, Maire Kehoe, Tony McGuckin, John Piermarini, Martin Donnelly, James Quill, Darin Egan, Padraic Edwards, Andrejus Chaliapinas, Lorcan McDonald, Simon McLoughlin, Paul Hannan)
Subject
Problems with NotesDirectory.NameLookup
Posted by
Uwe E. Jandt on 06/03/2012 at 05:46 AM
Details
Hi XPerts -
I tried to use the NotesDirectory Class but get the error msg:
Method NotesDirectory.lookupNames(string, string, Array, boolean) not found, or illegal parameters
my SSJS code goes like:
var userinfo = new Array()
userinfo[0] = "MailFile"
userinfo[1] = "MailServer"
userinfo[2] = "InternetAddress"
userinfo[3] = "ShortName"
userinfo[4] = "EmployeeID"
var ddir:NotesDirectory = session.getDirectory()
ddir.setSearchAllDirectories(false)
error --> var ddnav = ddir.lookupNames("$Users",@UserName(),userinfo,false)
doesn't it works with an js array?
if I write
var ddnav = ddir.lookupNames("$Users",@UserName(),"MailFile")
it doesn't throw an error (at this place) ...
... but it stops 2 lines further, at 'ddnav.getNameLocated()':
....
var ddnav = ddir.lookupNames("$Users",@UserName(),"MailFile")
var mypos = ddnav.findFirstName()
error --> if (ddnav.getNameLocated()) {
...
with the msg:
Error calling method 'getNameLocated()' on an object of type 'lotus.domino.local.DirectoryNavigator [Static Java Interface Wrapper, lotus.domino.local.DirectoryNavigator: lotus.domino.DirectoryNavigator]'
so isn't the NotesDirectory not really made for use in JS? I found it in designer's help, but the NotesDirectoryNavigator
is not a proposed domino object in the JS scripting reference.
I tried the whole code (very close to this) in lotus script, there it works without a problem.
Thanks for any help - and sorry for my "german" english, I hope you got my point.
Uwe
Modification history
| Entered 03-Jun-2012 5:46 by Uwe E. Jandt. Last Modified <none> by <none>. |
Feedback
Check out other projects
Anonymous