GetNoticeByUNID (NotesCalendar - LotusScript®)

Gets a calendar notice given its universal identifier (UNID).

Defined in



Set notesCalendarNotice = notesCalendar.GetNoticeByUNID( unid$ )
Parameter Description
unid String. The universal identifier (UNID) of the Domino® document containing the notice.
Return value Description
NotesCalendarEntry The calendar notice. An exception occurs if the identifier is invalid.


This agent gets a notice whose UNID is posted as an environment variable.
Sub Initialize
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim unid 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)
	Set db = session.CurrentDatabase
	REM Create document to post results
	Set doc = db.CreateDocument
	doc.Form = "main"
	doc.Subject = "Calendar notice"
	Set body = doc.Createrichtextitem("body")
	REM Get notice and put in body of document
	unid = session.Getenvironmentstring("noticeunid")
	body.Appendtext("Calendar entry for UNID " & unid)
	Call doc.Save( True, True )
End Sub