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



Aug 8, 2013, 3:12 PM
5 Posts
topic has been resolvedResolved

SSJS on Web can't see docs, can on client

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 3

I'm embarrassed to even post this, but I'm pulling my hair out.  This code is retuning null for the doc, and a doc with the key is clearly in the first sorted column of the view.  The view does not return null, so I definitely have a handle on that.  It's gotta be something security-related.  Can a second set of eyes spot it?  This is in the beforeRenderResponse event if that helps.  It works fine in client, but on web (logging in as same user), it doesn't get a handle on the doc.  The client will also return the view name, but on the web even that is null.  Very weird!

var exCon = facesContext.getExternalContext();

var request = exCon.getRequest(); // This is the actual HTTP servlet request...
var paramValue = request.getParameter("offer");
sessionScope.offer = paramValue;
var paramValue = request.getParameter("invite");
sessionScope.invite = paramValue;

// get handle on invite
var v:NotesView = database.getView("(Lookup - Invitations by UNID)");

sessionScope.status = v.getName();  // this returns the view name in client, but null on web
var doc:NotesDocument = v.getFirstDocument();  // this fails to get a handle on one of the 5 docs in the web, but works in client

if (v == null){
sessionScope.view = "view is null"
}else{
sessionScope.view = "view is not null"
}
if (doc == null){
sessionScope.doc = "doc is null"
}else{
sessionScope.doc = "doc is not null";
}

 


 

 

Aug 8, 2013, 6:09 PM
54 Posts
view

Is the view available for web access??

 

before this line -> var v:NotesView = database.getView("(Lookup - Invitations by UNID)");

try to receive the database title.

 

Aug 8, 2013, 7:05 PM
5 Posts
Thanks

Yes, I can get the database name fine with 'getTitle' from both web and client.  The view isn't hidden from the web, and I've tried other views in the database with the same result.  From the client, I can get the view title and the docs inside it.  From the web, I can get neither:(

Aug 8, 2013, 8:59 PM
5 Posts
"Fixed"

Well, out of frustration, I copied all my elements to a new database, and it works perfectly!

 

I have no idea what was corrupt, but I copied EVERYTHING from the database to a brand new database, and it works fine.  It seems like it was something security related, because I couldn't open any of the views or forms with a browser, which is what tipped me off to a possible issue.  Thanks for helping debug!


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