Manage Learn to apply best practices and optimize your operations.

Get User.Id

The name contain in user.id will be change after administration process of
rename person. Here is the sample to get the user.id for backup without ask
user to send you a copy.
Firstly, create a new database in your Domino to collect the ID files.

Database title: User ID Library
Database name: UserIDLib.nsf

Form name: User ID
Fields name: UserName
Type: Text
Fields name: UserID
Type: RichText

View: By User Name
1st column: UserName (sort)

Secondly, put the following srcipt in mail template of database "PostOpen",
then the ID files will store in the database tomorrow.

Sub Postopen(Source As Notesuidatabase)
Dim session As New NotesSession
Dim db As New NotesDatabase(YourDominoName , "UserIDLib.nsf" )
Dim view As NotesView
Dim IDdoc As NotesDocument
Dim Keys(0) As String
Keys(0) = session.CommonUserName
Set view = db.GetView( "By User Name" )
Set IDdoc = view.GetDocumentByKey( Keys, True )
If Not(IDdoc Is Nothing) Then Exit Sub
Dim linestring As String
Dim filenum As Integer
filenum = Freefile()
Open "C:\Windows\Notes.ini" For Input As #filenum
Do While Not Eof(filenum)
Line Input #filenum, linestring
If Left(linestring, 22) = "CertificateExpChecked=" Then
Dim Bs, Es As Integer
Dim IDLoc As String
Bs = Instr(1, linestring, "C:\" )
Es = Instr(Bs, linestring, " " )
IDLoc = Mid( linestring, Bs, Es - Bs )
End If
Loop
Close #filenum

Dim doc As NotesDocument
Set doc = New NotesDocument( db )
doc.Form = "User ID"
doc.UserName = session.CommonUserName
Dim rtitem As NotesRichTextItem
Dim notesEmbeddedObject As Notesembeddedobject
Set rtitem = New NotesRichTextItem( doc, "UserID" )
Set notesEmbeddedObject = rtitem.EmbedObject( EMBED_ATTACHMENT%, "", IDLoc)
Call doc.save(False, False)
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close