GetEntry (NotesCalendar - LotusScript®)

Gets a calendar entry.

Defined in

NotesCalendar

Syntax

Set notesCalendarEntry = notesCalendar.GetEntry( uid$ )
Parameter Description
uid String. The iCalendar identifier (UID item) of the entry.
Return value Description
NotesCalendarEntry The calendar entry. No exception occurs for this method if the identifier is invalid. However, when you attempt to use the returned NotesCalendarEntry object, the following exception occurs: Entry not found in index.

Usage

This method does not verify uid except for its existence. Validity checking and error reporting occur when you attempt to use the returned NotesCalendarEntry object.

Examples

This agent gets the calendar entry for a UID saved as an environment variable.
Sub Initialize
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim uid As String
	Dim cal As NotesCalendar
	Dim db As NotesDatabase
	Dim doc As NotesDocument
	Dim body As NotesRichTextItem
	REM Get calendar for current user
	Call maildb.Openmail()
	Set cal = session.getCalendar(maildb)
	REM Create document to post results
	Set db = session.CurrentDatabase
	Set doc = db.CreateDocument
	doc.Form = "main"
	doc.Subject = "Calendar entry"
	Set body = doc.Createrichtextitem("body")
	REM Get entry and put in body of document
	uid = session.Getenvironmentstring("currentuid")
	If uid = "" Then
		body.Appendtext("Current UID not set")
	Else
		body.Appendtext("Calendar entry for UID " & uid)
		body.Addnewline(1)
		body.Appendtext(cal.Getentry(uid).Read())
	End If
	Call doc.Save( True, True )
End Sub