This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Sep 7, 2015, 7:38 AM
21 Posts

XPages: Error at getNextDocument() from the current one

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 1

Hello...

In an XPage, where "doc" is the currently 'loaded' document, in a button's action I would like to obtain a handle to the document that appears under the current in a certain view.

I use the following code, which is generating an error at the last line:

-----------

    var v:NotesView = database.getView("ViewByYear");
    var curDoc:NotesDocument = doc.getDocument();

// curDoc = v.getFirstDocument();

    if (curDoc==null) return(false);
    var nextDoc = v.getNextDocument(curDoc);

-----------

The error message is: Script interpreter error, line=11, col=32: [TypeError] Exception occurred calling method NotesView.getNextDocument(lotus.domino.local.Document) null.

if I uncomment the comment line (setting curDoc as the first document in the view), the error does not occur.

Any idea why this is happening? How is the document generated from the context different? This document comes anyway from this same view which is embedded on the same XPage.

Thanks for your insights


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal