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



Jan 2, 2012, 11:01 AM
149 Posts
topic has been resolvedResolved

$REF is ok, but response count in SSJS and LS is zero

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 3
 
Hello 
I am trying to create responses to main documents in xPages, I have tried both setting it in code using doc.makeResponse(parent) and by setting the parent id on the new response data source.
 
everything seem to work , the responses get the $REF field and it points to the correct parent doc and when I open the response in the notes client and from the menu use "View-Parent Preview" the parent documents show up fine.
 
but when I try to use document.getResponses().getCount() in SSJS or document.responses.count in Lotusscript it always say 0  (zero)
 
 
any ideas?
 
Thomas 
 
 
 
 
Jan 2, 2012, 1:45 PM
261 Posts
Re: $REF is ok, but response count in SSJS and LS is zero
Hello Thomas,
 
Strange. I haven't had any problems using the .getReponses() method.
 
Does the web user have access to the response documents?
 
Mark
Jan 2, 2012, 4:25 PM
149 Posts
Re: $REF is ok, but response count in SSJS and LS is zero
 
Well, it is working in "normal use"
 
I have two similar scenarios where it does not work, I need to do some more investigation before I can tell if it is a bug or not.
 
I have with several other scenariois have problem where getCount or getResoonses does not work when running locally.
 
 
stay tuned
Thomas 
Jan 2, 2012, 4:47 PM
149 Posts
Re: $REF is ok, but response count in SSJS and LS is zero - SOLVED
Stupid me, I had enabled the db option: "don't support specialized response hierarchy"
 
Lessons learned: if you use "don't support specialized response hierarchy" then getCount and getResponses will not work in LS and SSJS
 
Case solved 
Thomas 
 
 

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