Skip to main content

Posts

Showing posts from June, 2016

Get specific user information out of lotus notes without traversing all documents

Getting specific user information out of lotus notes I had the need of reading from lotus notes specific user information, the solution i had before was traversing whole lotus notes document inside $people view and getting one by one document and comparing if this is the document i need But the problem with that approach was 1) It was not proper of having a loop 2) It was too slow and my web service was getting timed out as it was traversing There is a better way to do it like following var session = new NotesSession(); session.Initialize(password); NotesDatabase _serverDatabase = session.GetDatabase(serverName, "names.nsf", false); NotesView _peopleView = _serverDatabase.GetView("$Users"); // Searching using email, if any document matches with this email string NotesDocumentCollection tmpDoc = _peopleView.GetAllDocumentsByKey(userMail, false); // There could be multiple enteries for (int i = 0; i < tmpDoc.Count; i++) { NotesDocument tmpDoc1 = tmpD