decline (NotesCalendarNotice - JavaScript)

Declines a meeting.

Defined in

NotesCalendarNotice

Syntax

decline(comments:string) : void

decline(comments:string, keepinformed:boolean) : void

Parameter Description
comments Comments regarding a meeting change.
keepinformed Specify true to continue to receive notices about the meeting.
Possible exception Value Text Description
NotesError.NOTES_ERR_UNSUPPORTEDACTION 4811 Unsupported action The method is attempting to apply an action that is not valid for the entry.
NotesError.NOTES_ERR_OVERWRITEDISALLOWED 4813 This action is not allowed since it would overwrite personal changes The action should be verified then reissued with the overwrite flag set.
NotesError.NOTES_ERR_IDNOTFOUND 4814 Identifier not found The identifier for the NotesCalendarNotice object does not identify a notice in the calendar.

Examples

This button event declines a meeting.
var dbdir:NotesDbDirectory = session.getDbDirectory("");
var maildb:NotesDatabase = dbdir.openMailDatabase();
var cal:NotesCalendar = session.getCalendar(maildb);
var unid:string = sessionScope.noticeunid;
var caln:NotesCalendarNotice = cal.getNoticeByUNID(unid);
caln.decline("Will be out", true);
requestScope.status = "Calendar notice for UNID " + unid + " declined\n";

LotusScript® syntax and examples

NotesCalendarNotice.Decline(Byval comments As String, Optional keepinformed As Boolean)
This agent declines a meeting.
Sub Initialize
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim unid As String
	Dim cal As NotesCalendar
	Dim caln As NotesCalendarNotice
	REM Get calendar for current user
	Call maildb.Openmail()
	Set cal = session.getCalendar(maildb)
	REM Get notice and decline
	unid = session.Getenvironmentstring("noticeunid")
	Set caln = cal.Getnoticebyunid(unid)
	Call caln.Decline("Will be out", True)
End Sub

Java syntax and examples

void NotesCalendarNotice.decline(String comments)
void NotesCalendarNotice.decline(String comments, boolean keepinformed)
This agent declines a 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);
          // Get notice and decline
          String unid = session.getEnvironmentString("noticeunid");
          NotesCalendarNotice caln = cal.getNoticeByUNID(unid);
          caln.decline("Will be out", true);

      } catch(Exception e) {
          e.printStackTrace();
       }
   }
}