Search code examples
xpageslotusscriptssjs

XPages - SSJS - Get ALL profile documents


With LotusScript I can use Set notesDocumentCollection = db.GetProfileDocCollection() to get a collection of ALL the profile documents in a database. I would like to do the same using SSJS. However, database.getProfileDocCollection(profileName) obliges me to use a specific profile name. Is there any way in SSJS of getting a collection of ALL profile documents in a database (as is the case with LotusScript)?


Solution

  • You can get all profile documents with

      var dc:NotesDocumentCollection = database.getProfileDocCollection(null);
    

    Just set null as parameter. Tested it with Domino 8.5.3 FP6 and 9.0.1 FP1.