ReadXLotusPropsOutputLevel (NotesCalendar - JavaScript)

Read-write. Controls the return of X-LOTUS properties when reading a calendar entry or notice.

Defined in

NotesCalendar

Syntax

getReadXLotusPropsOutputLevel() : int

setReadXLotusPropsOutputLevel(option:int) : void

Usage

Before reading an entry or notice, you can set this option or accept the default NotesCalendar.CS_XLOTUS_READ_DEFAULT.
Constant name Numerical value
NotesCalendar.CS_XLOTUS_READ_DEFAULT (0) Generates non-proprietary X-LOTUS properties. This is the default if this property is not set prior to reading.
NotesCalendar.CS_XLOTUS_READ_NONE (1) Omits all X-LOTUS properties.
NotesCalendar.CS_XLOTUS_READ_ALL (2) Generates proprietary X-LOTUS properties. The caller must know how to update these.

Examples

This button event reads calendar entries with no X-LOTUS properties.
var dbdir:NotesDbDirectory = session.getDbDirectory("");
var maildb:NotesDatabase = dbdir.openMailDatabase();
var cal:NotesCalendar = session.getCalendar(maildb);
var dt1:NotesDateTime = session.createDateTime("Today 08");
var dt2:NotesDateTime = session.createDateTime("Tomorrow 17");
cal.setReadXLotusPropsOutputLevel(NotesCalendar.CS_XLOTUS_READ_NONE);
requestScope.status = cal.readRange(dt1, dt2)

LotusScript® syntax and examples

NotesCalendar.ReadXLotusPropsOutputLevel As Integer
This agent reads calendar entries with no X-LOTUS properties
Sub Initialize
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim cal As NotesCalendar
	Dim dt1 As NotesDateTime
	Dim dt2 As NotesDateTime
	Dim calstr As String
	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 dt1 = session.createdatetime("Today 08")
	Set dt2 = session.Createdatetime("Tomorrow 17")
	REM Create document to post results
	Set db = session.CurrentDatabase
	Set doc = db.CreateDocument
	doc.Form = "main"
	doc.Subject = "Today and tomorrow"
	Set body = doc.Createrichtextitem("body")
	REM Read and put in body of document
	cal.Readxlotuspropsoutputlevel = Cs_xlotus_read_none
	calstr = cal.Readrange(dt1, dt2)
	Call body.Appendtext(calstr)
	Call doc.Save( True, True )
End Sub

Java syntax and examples

int NotesCalendar.getReadXLotusPropsOutputLevel()
void NotesCalendar.setReadXLotusPropsOutputLevel(int option)
This agent reads calendar entries with no X-LOTUS properties
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 08");
          DateTime dt2 = session.createDateTime("Tomorrow 17");
          cal.setReadXLotusPropsOutputLevel(NotesCalendar.CS_XLOTUS_READ_NONE);
          String calstr = cal.readRange(dt1, dt2);
          
          // Write result to document
          Database db = agentContext.getCurrentDatabase();
          Document doc = db.createDocument();
          doc.appendItemValue("Form", "main");
          doc.appendItemValue("subject", "Calendar entry");
          RichTextItem body = doc.createRichTextItem("body");
          body.appendText(NotesCalendar.CS_XLOTUS_READ_NONE + "\n");
          body.appendText(calstr);
          doc.save(true, true);

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