cancel (NotesCalendarEntry - JavaScript)

会議のエントリ (複数可) をキャンセルします。

定義場所

NotesCalendarEntry

構文

cancel(comments:string) : void

cancel(comments:string, scope:int, recurid:string) : void

パラメータ 説明
comments 会議の変更に関するコメント。
scope 反復操作の範囲:
  • CS_RANGE_REPEAT_ALL (1)
  • CS_RANGE_REPEAT_CURRENT (0)
  • CS_RANGE_REPEAT_FUTURE (3) (当該要素を含む)
  • CS_RANGE_REPEAT_PREV (2) (当該要素を含む)
recurid 反復するカレンダーイベントの反復識別子 (RECURRENCE-ID アイテム)。 反復識別子の形式は、UTC 形式での時刻です (20120913T160000Z など)。
Possible exception テキスト 説明
NotesError.NOTES_ERR_INVALIDID 4757 無効 ID NotesCalendarEntry オブジェクトの識別子が無効です。
NotesError.NOTES_ERR_RECURID_NOTFOUND 4808 反復識別子が見つかりません。 NotesCalendarEntry オブジェクトの反復識別子が無効です。
NotesError.NOTES_ERR_IDNOTFOUND 4814 ID が見つかりません NotesCalendarEntry オブジェクトの反復識別子がカレンダーのエントリを示していないか、 反復識別子の scoperecurid がありません。

使用法

このメソッドは会議のエントリを処理し、通知は処理しません。

このボタンイベントは、 繰り返し発生する会議の最初のインスタンスをキャンセルします。
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® 構文と例

NotesCalendarEntry.Cancel(Byval comments As String, Optional scope As Integer, Optional Byval recurid As String)
このエージェントは、 繰り返し発生する会議の最初のインスタンスをキャンセルします。
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™ 構文と例

void NotesCalendarEntry.getAsDocument(String comments)
void NotesCalendarEntry.getAsDocument(String comments, int scope, String recurid)
このエージェントは、 繰り返し発生する会議の最初のインスタンスをキャンセルします。
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();
       }
   }
}