can anyone please tell how to use @NameLookUp formula in lotus Notes.I need it to retrieve the internet address from the Canonical Form of the user.I could not find any example in the net.It would be of great help if an example is given.
1
votes
use evaluate to execute @formula in Java: publib.boulder.ibm.com/infocenter/domhelp/v8r0/…
- Knut Herrmann
thanks for the reply..i am using the formula as String userName="CN=sam peat/OU=QUO/O=SCT@SCT"; Vector vec=m_session.evaluate("@NameLookup([Exhaustive];\""+ userName + "\"; \"InternetAddress\")"); this is not retrieving any details.i am not getting where i am going wrong..plz help..
- Phoenix
Try userName without "@SCT".
- Knut Herrmann
hey knut..it works after removing the @SCT part..thanks
- Phoenix
hi knut..can u post your suggestion as answer please
- Phoenix
3 Answers
3
votes
If you are running Domino 8 above, you should be able to do this:
String address = "";
Directory d = session.getDirectory();
DirectoryNavigator dn = d.lookupNames("$Users","CN=sam peat/OU=QUO/O=SCT","InternetAddress",false);
Then you can use the methods of the DirectoryNavigator class (i.e. findFirstMatch(), getFirstItemValue()), to get the returned value.
0
votes
Use Evaluate to execute @NameLookup formula in Java.
Remove "@SCT" from parameter username String userName="CN=sam peat/OU=QUO/O=SCT@SCT" in your example.