My goal is to have a link on an XPage that opens a specific document by key.
My problem is I’m getting an error when I try to retrieve the document. I’m sure I’m doing something dumb, but haven’t determined what.
First I put a computed field on the page with the intention of just displaying a value on the document I’ve found. I’ll tackle opening the document once I know I can find it.
My code looks like this:
1: var comp = getComponent(“ukey”).getValue();
2: var doc = database.getDocumentByID(“NT0000093E”);
3: return doc.getValue(“form”);
The Error is:
Script interpreter error, line=2, col=20: Exception occurred calling method NotesDatabase.getDocumentByID(string) null
The first line is meaningless at the moment. I have another computed field on the XPage that contains the key. I can get that no problem.
But because of the error, I decided to hardcode the key it. It it still says null.
Any advice would really be appreciated.
Thanks!
Dave