I am trying to get information from a specific document (an application settings document) that I had set up for the application before it was using x pages.
I was hoping to get some values from the fields in this document to use in some server side js that will send emails etc in an xpage.
I have a view that has the app settings document in it. It also has a column for the doc id. Suggestions on how to retrieve these values is ultimately what im after. Thanks for any help.
Subject: Re: Xpages get field value from specific document
If the view you are talking about has only one document in it being your app settings document, you could do the following in JavaScript:
var appSettingsDoc:NotesDocument = database.getView(“NameOfViewContainingAppSettings”).getFirstDocument();
var field = appSettingsDoc.getItemValue…(“FieldName”);
If it is not the only document in the view and you have a certain unique key (a UNID for example) you could use:
database.getView(“NameOfViewContainingAppSettings”).getDocumentByKey(yourKey);
…
(note that the column containing the key needs to be sorted)
For further information have a look at the Domino Designer Help (look for “NotesView” in the Lotus Domino Designer XPages Reference section). There you should find everything you need.