Manage Learn to apply best practices and optimize your operations.

Find document by NoteID

Every want to find a document by noteid here is a utility that will allow you do to that.

Every want to find a document by noteid here is a utility that will allow you do to that.

Create an admin tools database. In the database create a form and add the following fields.

Type     : Names
Comment  : Use address book for lookup

Type     : Text

Type : Text 
Translation Formula: 
This will remove the NT portion of the ID.

FIELDNAME: SaveOptions
Type : Text
Value : "0" (Computed when composed)DESC: This will prevent the current
document from being saved in the database BUTTON: Used to execute the code below. When you click on the button it goes out and finds the noteid in the
database you specify and opens it in the current UI window. Code: Sub Click(Source As Button) Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim uinote As NotesUIDocument Dim doc As NotesDocument Dim s As New NotesSession Dim db As NotesDatabase Set uidoc = ws.CurrentDocument Call uidoc.refresh server = uidoc.FieldGetText("Server") dbpath = uidoc.FieldGetText("DbPath") noteid = uidoc.FieldGetText("NoteID") Set db = s.GetDatabase(server, dbpath) If db.isopen Then Set doc = db.GetDocumentByID( noteid) If Not doc Is Nothing Then Set uinote = ws.EditDocument(False, doc) End If Else Msgbox "Unable to open (" & dbpath & ") Please check
spelling and or access and try again.", 48,"Unable to open database" End If End Sub

Dig Deeper on Domino Resources - Part 6



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury