0
votes

enter image description hereHi In My Xpages application, I would like to take reference of HTML stored in NotesDocument richtext field( Cofiguration document in Notes Client ), so in Xpages data source I mentioned configDoc as source as Notes Domino Document and in Default Action I set it to " Open Document" and in Document id " I set Computed value as below"

var vw:NotesView = database.getView("vwConfig")
var doc:NotesDocument = vw.getFirstDocument()
var uniid:String = doc.getUniversalID();
 return uniid

In one of the place I placed on computedField property, I mentioned ssjs code as

return configDoc.getValue("RTFIeldasHTML").getHTML();

this works if I open document but does not work if I open existing document and it gives me an error:

Error while executing JavaScript computed expression
docConfig.getValue()' is null
1
You can’t use an undeclared variable and not use getValue() on a documentThomas Adrian
It works on new document, but it does not work if I open existing document. configDoc is declared in Xpages Data source as an opendocument and as document id provided as above computed codehdc prv
And what is docConfig?Thomas Adrian
See image attached in main posthdc prv

1 Answers

2
votes

Most likely cause is docConfig doesn't have ignoreRequestParams="true". That means it's opening the document whose ID is in the URL and ignore anything you put in the documentId property. Set that and it will work correctly.