Cancels a meeting entry or entries.
Parameter |
Description |
comments |
Comments regarding a meeting change. |
scope |
The scope of a recurring operation:
CS_RANGE_REPEAT_ALL (1)
CS_RANGE_REPEAT_CURRENT (0)
CS_RANGE_REPEAT_FUTURE (3), inclusive
CS_RANGE_REPEAT_PREV (2), inclusive
|
recurid |
The recurrence identifier (RECURRENCE-ID item)
for a recurring calendar event. The format of a recurrence identifier
is a time in UTC format, for example, 20120913T160000Z . |
Possible exception |
Value |
Text |
Description |
NotesError.NOTES_ERR_INVALIDID |
4757 |
Invalid ID |
The identifier for the NotesCalendarEntry object
is not valid. |
NotesError.NOTES_ERR_RECURID_NOTFOUND |
4808 |
Recurrence-ID not found |
The recurrence identifier for the NotesCalendarEntry object is not valid. |
NotesError.NOTES_ERR_IDNOTFOUND |
4814 |
Identifier not found |
The recurrence identifier for the NotesCalendarEntry object does not identify
an entry in the calendar, or the scope and recurid are
missing for a recurring entry. |
Usage
This method deals with meeting entries,
not notices.
Examples
This button event cancels the first
instance of a recurring meeting.try {
var dbdir:NotesDbDirectory = session.getDbDirectory("");
var maildb:NotesDatabase = dbdir.openMailDatabase();
var cal:NotesCalendar = session.getCalendar(maildb);
var dt1:NotesDateTime = session.createDateTime("Today 18");
var dt2:NotesDateTime = session.createDateTime("Today 18 01");
var formatter = new java.text.SimpleDateFormat("yyyyMMdd");
var today:String = formatter.format(new java.util.Date());
var recurid:String = today + "T220000Z";
var entries:java.util.Vector = cal.getEntries(dt1, dt2);
if (entries.size() > 0) {
var cale:NotesCalendarEntry = entries.firstElement();
cale.cancel("No meeting today", NotesCalendarEntry.CS_RANGE_REPEAT_CURRENT, recurid);
}
} catch(e) {
requestScope.status = e.message;
}
LotusScript® syntax
and examples
NotesCalendarEntry.Cancel(Byval comments As String, Optional scope As Integer, Optional Byval recurid As String)
This
agent cancels the first instance of a recurring meeting.Sub Initialize
Dim session As New NotesSession
Dim maildb As New NotesDatabase("", "")
Dim cal As NotesCalendar
Dim calentry As NotesCalendarEntry
Dim dt1 As NotesDateTime
Dim dt2 As NotesDateTime
Dim tday As String
Dim recurid As String
Dim entries As Variant
Dim cale As NotesCalendarEntry
REM Get calendar for current user and create entry
Call maildb.Openmail()
Set cal = session.getCalendar(maildb)
Set dt1 = session.createdatetime("Today 18")
Set dt2 = session.createdatetime("Today 18 01")
tday = Format(Today, "yyyymmdd")
recurid = tday & "T220000Z"
entries = cal.Getentries(dt1, dt2)
If Not IsEmpty(entries) Then
Set cale = entries(0)
Call cale.Cancel("No meeting today", Cs_range_repeat_current, recurid)
End If
End Sub
Java™ syntax
and examples
void NotesCalendarEntry.getAsDocument(String comments)
void NotesCalendarEntry.getAsDocument(String comments, int scope, String recurid)
This
agent cancels the first instance of a recurring meeting.import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
DbDirectory dbdir = session.getDbDirectory("");
Database maildb = dbdir.openMailDatabase();
NotesCalendar cal = session.getCalendar(maildb);
DateTime dt1 = session.createDateTime("Today 18");
DateTime dt2 = session.createDateTime("Today 18 01");
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyyMMdd");
String today = formatter.format(new java.util.Date());
String recurid = today + "T220000Z";
java.util.Vector entries = cal.getEntries(dt1, dt2);
if (entries.size() > 0) {
NotesCalendarEntry cale = (NotesCalendarEntry)entries.firstElement();
cale.cancel("No meeting today", NotesCalendarEntry.CS_RANGE_REPEAT_CURRENT, recurid);
}
} catch(Exception e) {
e.printStackTrace();
}
}
}