UID (NotesCalendarEntry - LotusScript®)
Read-only. Globally unique identifier of a calendar entry
in iCalendar
format.
Defined in
NotesCalendarEntryData type
StringSyntax
To get: uid$ = notesCalendarEntry.UID
Usage
The UID is generated upon creation of the entry and takes the following form:UID:F0A3694E4E7E20938525790F004D370A-Lotus_Notes_Generated
Examples
This agent gets a calendar entry using the UNID for a document from the($Calendar)
view
in the mail database of the current user, and posts its UID to an
environment variable.Sub Initialize
Dim session As New NotesSession
Dim maildb As New NotesDatabase("", "")
Dim calview As NotesView
Dim caldoc As NotesDocument
Dim unid As String
Dim cal As NotesCalendar
Dim cale As NotesCalendarEntry
Dim s As String
Dim n As Long
REM Get calendar for current user
Call maildb.Openmail()
Set cal = session.getCalendar(maildb)
REM Get number of calendar entry
s = InputBox("Enter an integer", "calentry", 1)
If IsNumeric(s) Then
n = Clng(s)
Else
MessageBox "Not numeric: " & s,, "Error"
Exit sub
End If
REM Get calendar entry and post UID to environment variable
Set calview = maildb.Getview("($Calendar)")
Set caldoc = calview.Getnthdocument(n)
If caldoc Is Nothing Then
MessageBox "Calendar entry out of range",, "Error"
Exit sub
Else
unid = caldoc.Universalid
Set cale = cal.Getentrybyunid(unid)
Call session.Setenvironmentvar("currentuid", cale.Uid)
End If
End Sub