S
susinmn
Получаю вот так:
<!--shcode--><pre><code class='avto'>var edc:NotesDatabase = session.getDatabase(database.getServer(), "тут путь names.nsf или единой .nsf", false);
if (edc == null) {
return "";
} else {
var edcview = edc.getView("вью, первая колонка FullLN");
if (edcview == null) {
return "";
} else {
var edcdoc:NotesDocument = edcview.getDocumentByKey(context.getUser().getDistinguishedName());
if (edcdoc == null) {
return "";
} else {
var maildb:NotesDatabase = session.getDatabase(database.getServer(), edcdoc.getItemValueString("MailFile"), false);
if (maildb == null) {
return "";
} else {
var mailinbox = maildb.getView("($Inbox)");
if (mailinbox == null) {
return "";
} else {
return mailinbox.getAllUnreadEntries().getCount().toString();
}
}
}
}
}[/CODE]
но медленно при первом обращении. Есть ли метод быстрее получить информацию?
Спасибо.
<!--shcode--><pre><code class='avto'>var edc:NotesDatabase = session.getDatabase(database.getServer(), "тут путь names.nsf или единой .nsf", false);
if (edc == null) {
return "";
} else {
var edcview = edc.getView("вью, первая колонка FullLN");
if (edcview == null) {
return "";
} else {
var edcdoc:NotesDocument = edcview.getDocumentByKey(context.getUser().getDistinguishedName());
if (edcdoc == null) {
return "";
} else {
var maildb:NotesDatabase = session.getDatabase(database.getServer(), edcdoc.getItemValueString("MailFile"), false);
if (maildb == null) {
return "";
} else {
var mailinbox = maildb.getView("($Inbox)");
if (mailinbox == null) {
return "";
} else {
return mailinbox.getAllUnreadEntries().getCount().toString();
}
}
}
}
}[/CODE]
но медленно при первом обращении. Есть ли метод быстрее получить информацию?
Спасибо.