Home > Domino Tips > Administrator > Database > Find document by NoteID
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE

Find document by NoteID


Pablo Herman
04.26.2002
Rating: -3.40- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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.

Code

FIELDNAME: Server 
Type     : Names
Comment  : Use address book for lookup

FIELDNAME: DBPath
Type     : Text

FIELDNAME: NoteID
Type : Text 
Translation Formula: 
@IF(@Contains(NoteID;"NT");@Right(NoteID;@Length(NoteID)-2);NoteID)
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

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Database
Quickly scan all databases on a Lotus Domino server
LotusScript code rebuilds corrupted busytime.nsf file
How to move Notes databases off Domino 8 servers and save disk space
Top 10 Lotus Notes/Domino administration tips of 2008
Batch file runs scheduled Lotus Notes database maintenance tasks
Fix and update Lotus Notes documents with limited access
Programmatically replace the design of Lotus Notes databases
Add a program doc to compact Lotus Notes databases automatically
More efficient local Lotus Notes database replication
Remove orphaned Lotus Notes documents on Domino databases with a 'virtual delete'

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts