GetNotesView中有文档时,GetAllDocumentsByKey返回null

问题描述 投票:0回答:1

我无法从视图中检索文档。

这是lotusscript代码:

  View notesTriggerView = db.getView("salesOrderTriggerView");
  DocumentCollection dc = notesTriggerView.getAllDocumentsByKey("N", true);
  Document triggerDocument = dc.getFirstDocument();
  while(triggerDocument != null){

视图如下所示:enter image description here

但是请保持为空。查看名称别名一切正确。

lotus-notes lotus-domino
1个回答
0
投票

您不能使用空检查。而是检查Nothing

View notesTriggerView = db.getView("salesOrderTriggerView");
DocumentCollection dc = notesTriggerView.getAllDocumentsByKey("N", true);
Document triggerDocument = dc.getFirstDocument();
While Not (triggerDocument Is Nothing)
    ' Logic
Wend
© www.soinside.com 2019 - 2024. All rights reserved.