开发者

Lotus Notes/Domino Designer 8 - Get User Name from E-mail

开发者 https://www.devze.com 2023-01-11 03:44 出处:网络
I ha开发者_JAVA技巧ve a bunch of users I am adding to conference.They are contained both in a user\'s address book and on the Notes server/main company address book.Once I have the e-mail address of a

I ha开发者_JAVA技巧ve a bunch of users I am adding to conference. They are contained both in a user's address book and on the Notes server/main company address book. Once I have the e-mail address of a user, is there a way to look up their user name?


You can lookup the internet email address in the company Name and Addresss Book (NAB) database. I believe out-of-the-box, there is a view in the NAB named "Person / By Internet Email". From within a Notes agent, you can use formula language (use @DBLookup) or script (using notesView.getDocumentByKey). Or you can use COM to do the lookup.

In script, this would look something like:

...
dim s as new notesSession, db as notesDatabase, vw as notesView, doc as notesDocument
set db = s.getDatabase (YOUR_SERVER, "names.nsf")
set vw = db.getView ("People\By Internet Mail")
set doc = vw.getDocumentByKey (EMAIL_ADDRESS_VALUE, true)
if not (doc is nothing) then
    sName = doc.FullName(0)
end if
....
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号