Florin Pop
Florin Pop

Reputation: 5135

Xpages getting field value knowing the UNID of the document

Is there a way I can get the field value of a document if I know the document UNID?

I have the following code:

var a = database.getDocumentByUNID(sessionScope.unid);

I can't see any methods avaible if I do a. . Is there something wrong?

Upvotes: 1

Views: 204

Answers (1)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15729

SSJS does not provide typeahead unless you specifically cast variables as the class you wish to use. So to get typeahead you need to use:

var a:NotesDocument = database.getDocumentByUNID(sessionScope.unid);

Upvotes: 5

Related Questions