publish
plugins.it2be_outlook info


Servoy Properties Summary
String build
Date buildDate
String component
String licensee
String typeLicensed
Number version
String versionLicensed


Servoy Methods Summary
void close( )
IOAppointment createAppointment( )
IOAppointment createAppointment( String )
String createAppointmentFolder( String )
IOContact createContact( String )
IOContact createContact( )
String createContactFolder( String )
IOMail createMail( )
String createMailFolder( FolderType, String )
IONote createNote( )
IONote createNote( String )
String createNoteFolder( String )
IOTask createTask( String )
IOTask createTask( )
String createTaskFolder( String )
String getApplicationVersion( )
IOAppointment getAppointment( Object )
OutlookFolderID getAppointmentFolderID( )
OutlookFolderID getAppointmentFolderID( String )
Array<Object> getAppointmentFolders( )
Array<Object> getAppointmentFolders( String )
Array<Array<Object>> getAppointmentFoldersArray( String )
Array<Array<Object>> getAppointmentFoldersArray( )
IOAppointment getAppointmentSet( String, Array<Object> )
IOAppointment getAppointmentSet( )
IOAppointment getAppointmentSet( String )
IOContact getContact( Object )
OutlookFolderID getContactFolderID( String )
OutlookFolderID getContactFolderID( )
Array<Object> getContactFolders( String )
Array<Object> getContactFolders( )
Array<Array<Object>> getContactFoldersArray( )
Array<Array<Object>> getContactFoldersArray( String )
IOContact getContactSet( )
IOContact getContactSet( String )
IOContact getContactSet( String, Array<Object> )
IOMail getMail( String )
OutlookFolderID getMailFolderID( FolderType, String )
OutlookFolderID getMailFolderID( FolderType )
Array<Object> getMailFolders( FolderType )
Array<Object> getMailFolders( FolderType, String )
Array<Array<Object>> getMailFoldersArray( FolderType )
Array<Array<Object>> getMailFoldersArray( FolderType, String )
IOMail getMailSet( FolderType, String, Array<Object> )
IOMail getMailSet( FolderType )
IOMail getMailSet( FolderType, String )
IOMeeting getMeeting( Object )
IOMeeting getMeetingSet( )
IOMeeting getMeetingSet( String, Array<Object> )
IOMeeting getMeetingSet( String )
IONote getNote( Object )
OutlookFolderID getNoteFolderID( )
OutlookFolderID getNoteFolderID( String )
Array<Object> getNoteFolders( String )
Array<Object> getNoteFolders( )
Array<Array<Object>> getNoteFoldersArray( )
Array<Array<Object>> getNoteFoldersArray( String )
IONote getNoteSet( String, Array<Object> )
IONote getNoteSet( String )
IONote getNoteSet( )
IOPost getPost( Object )
IOPost getPostSet( FolderType, String, Array<Object> )
IOPost getPostSet( FolderType, String )
IOPost getPostSet( FolderType )
IOTask getTask( Object )
Array<Object> getTaskArray( String )
Array<Object> getTaskArray( )
OutlookFolderID getTaskFolderID( )
OutlookFolderID getTaskFolderID( String )
Array<Object> getTaskFolders( )
Array<Object> getTaskFolders( String )
Array<Array<Object>> getTaskFoldersArray( )
Array<Array<Object>> getTaskFoldersArray( String )
IOTask getTaskSet( )
IOTask getTaskSet( String )
IOTask getTaskSet( String, Array<Object> )
Boolean itemExists( String )
Boolean logoff( )
Boolean logon( String, String )
String moveAppointment( String, String )
String moveContact( String, String )
String moveMail( FolderType, String, String )
String moveMeeting( String, String )
String moveNote( String, String )
String movePost( FolderType, String, String )
String moveTask( String, String )
Boolean open( )
void quitApplication( )
Boolean register( String )
Boolean removeAppointment( String )
Boolean removeAppointmentFolder( String )
Boolean removeContact( String )
Boolean removeContactFolder( String )
Boolean removeMail( String )
Boolean removeMailFolder( FolderType, String )
Boolean removeMeeting( String )
Boolean removeNote( String )
Boolean removeNoteFolder( String )
Boolean removePost( String )
Boolean removeTask( String )
Boolean removeTaskFolder( String )
String typeToString( Object )


Servoy Properties Details


build
String  build
Returns the current version (major, minor, build)
Returns
String  build String

Supported Clients
SmartClient


buildDate
Date  buildDate
Returns date release date
Returns
Date  date Date

Supported Clients
SmartClient


component
String  component
Returns the component name
Returns
String  name String

Supported Clients
SmartClient


licensee
String  licensee
Returns the licensee
Returns
String  licensee String

Supported Clients
SmartClient


typeLicensed
String  typeLicensed
Returns the type that is valid for this license
Returns
String  type String

Supported Clients
SmartClient


version
Number  version
Returns the current version (major, minor)
Returns
Number  version Double

Supported Clients
SmartClient


versionLicensed
String  versionLicensed
Returns the version that is valid for this license
Returns
String  license String

Supported Clients
SmartClient

Servoy Methods Details


close
void  close( )
Close the connection with MS Outlook
Returns
void  

Supported Clients
SmartClient

Sample
// Logoff MS Outlook
plugins.it2be_outlook.logoff();

// Close the connection with MS Outlook


createAppointment
IOAppointment  createAppointment( )
Create an appointment, returns outlookId when created.
Returns
IOAppointment  appointment IOAppointment

Supported Clients
SmartClient

Sample
// Create an appointment, returns outlookId when created.
// create the appointment in MS Outlook
// your root folder wil always be the 'calendar' folder on the client pc
var appointment = plugins.it2be_outlook.createAppointment();

// you can also create an appointment direct into a subfolder, seperate the folders with ':'
// var appointment = plugins.it2be_outlook.createAppointment("private:friends");

if (appointment) {
var start = new Date();

//set the data, there are many more fields available than these
appointment.subject = "test";
appointment.start = start;
appointment.duration = 60;
appointment.reminderSet = false;
appointment.location = "fun palace";
appointment.busyStatus = plugins.it2be_outlook.type.busyStatus_OUT_OF_OFFICE;

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.appointmentid = appointment.save();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the appointment failed");
}


createAppointment
IOAppointment  createAppointment( String )
Create an appointment, returns outlookId when created.
Parameters
String  path  the path

Returns
IOAppointment  appointment IOAppointment

Supported Clients
SmartClient

Sample
// Create an appointment, returns outlookId when created.
// create the appointment in MS Outlook
// your root folder wil always be the 'calendar' folder on the client pc
var appointment = plugins.it2be_outlook.createAppointment();

// you can also create an appointment direct into a subfolder, seperate the folders with ':'
// var appointment = plugins.it2be_outlook.createAppointment("private:friends");

if (appointment) {
var start = new Date();

//set the data, there are many more fields available than these
appointment.subject = "test";
appointment.start = start;
appointment.duration = 60;
appointment.reminderSet = false;
appointment.location = "fun palace";
appointment.busyStatus = plugins.it2be_outlook.type.busyStatus_OUT_OF_OFFICE;

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.appointmentid = appointment.save();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the appointment failed");
}


createAppointmentFolder
String  createAppointmentFolder( String )
Create an appointment/meeting folder with the entered name.
Parameters
String  path  the path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Create an appointment/meeting folder with the entered name.
// appointment (calendar) folders are also used for meetings
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:family");
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getAppointmentFolder(s);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getAppointmentFolders("private");
// When we use getAppointmentFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getAppointmentFoldersArray("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


createContact
IOContact  createContact( String )
Create a contact, returns outlookId when created.
Parameters
String  path  the path

Returns
IOContact  contact IOContact

Supported Clients
SmartClient

Sample
// Create a contact, returns outlookId when created.
// create the contact in MS Outlook
// your root folder wil always be the contact folder on the client pc
var contact = plugins.it2be_outlook.createContact();

// you can also create a contact direct into a subfolder, seperate the folders with ':'
// var contact = plugins.it2be_outlook.createContact("private:friends");

if (contact) {
//set the data, there are many more fields available than these
contact.firstName = "firstname";
contact.lastName = "surname";

contact.companyName = "company_name";

contact.businessAddressStreet = "street 1";
contact.businessAddressCity = "city";
contact.businessAddressCountry = "country";
contact.importance = plugins.it2be_outlook.type.importance_HIGH;

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.contactid = contact.save();

//and display the MS Outlook record as if it is part of the solution
contact.display();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the contact failed");
}


createContact
IOContact  createContact( )
Create a contact, returns outlookId when created.
Returns
IOContact  contact IOContact

Supported Clients
SmartClient

Sample
// Create a contact, returns outlookId when created.
// create the contact in MS Outlook
// your root folder wil always be the contact folder on the client pc
var contact = plugins.it2be_outlook.createContact();

// you can also create a contact direct into a subfolder, seperate the folders with ':'
// var contact = plugins.it2be_outlook.createContact("private:friends");

if (contact) {
//set the data, there are many more fields available than these
contact.firstName = "firstname";
contact.lastName = "surname";

contact.companyName = "company_name";

contact.businessAddressStreet = "street 1";
contact.businessAddressCity = "city";
contact.businessAddressCountry = "country";
contact.importance = plugins.it2be_outlook.type.importance_HIGH;

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.contactid = contact.save();

//and display the MS Outlook record as if it is part of the solution
contact.display();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the contact failed");
}


createContactFolder
String  createContactFolder( String )
Create a contact folder with the entered name.
Parameters
String  path  the path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Create a contact folder with the entered name.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createContactFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createContactFolder("private:family");
globals.folderId = plugins.it2be_outlook.createContactFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getContactFolders();
// When we use getContactFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getContactFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getContactFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][1] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


createMail
IOMail  createMail( )
Create a(n empty) mail message prior to setting it.
Returns
IOMail  email IOMail

Supported Clients
SmartClient

Sample
// Create a(n empty) mail message prior to setting it.
// Send your email through MS Outlook mail.
// your root folder wil always be the 'outbox' folder on the client pc
var mail = plugins.it2be_outlook.createMail();

// you can also create an email direct into a subfolder, seperate the folders with ':'
// var mail = plugins.it2be_outlook.createMail("private:friends");

if (mail) {
//set the data, there are many more fields available than these
mail.to = "[email protected]";
mail.subject = "test";
mail.body = "are you happy with the result?";
mail.sensitivity = plugins.it2be_outlook.type.sensitivity_CONFIDENTIAL;

//or send an HTML message
//mail.htmlBody = "are you 
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
         happy 
        with the result?";

//with or without cc and bcc
//mail.cc = "[email protected]";
//mail.bcc ="[email protected]";

//retrieve a file to attach to the email
var file = plugins.file.showFileOpenDialog(1);

//when the file is selected attach it, you can attach more than one attachment!
if (file) {
mail.createAttachment(file);
}

//save the data.
//this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
//there are three ways to use the send(..) method:
//return the Outlook ID of the email that it has/had assigned in the outbox.
//globals.mailid = mail.send();
//will wait until the method is sent and returns the Outlook ID from the sent items box.
globals.mailid = mail.send(true);
//will return the Outlook ID when the mail is sent (without waiting) to the method.
//globals.mailid = mail.send(method);
} else {
plugins.dialogs.showErrorDialog("Error", "creating the email message failed");
}


createMailFolder
String  createMailFolder( FolderType, String )
Create an email/post folder with the entered name.
Parameters
FolderType  defaultFolder  the default folder
String  path  the path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Create an email/post folder with the entered name.
// the parent folder must always be created first
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:family");
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX);
// When we use getMailFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getMailFoldersArray(plugins.it2be_outlook.type.folder_INBOX);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX, "private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


createNote
IONote  createNote( )
Create a note, returns outlookId when created.
Returns
IONote  note IONote

Supported Clients
SmartClient

Sample
// Create a note, returns outlookId when created.
// create the note in MS Outlook
// your root folder wil always be the note folder on the client pc
var note = plugins.it2be_outlook.createNote();

// you can also create a note direct into a subfolder, seperate the folders with ':'
// var note = plugins.it2be_outlook.createNote("private:friends");

if (note) {
var start = new Date();
start.setHours(10)
start.setMinutes(0)
start.setSeconds(0)

var due = new Date();
due.setHours(10)
due.setMinutes(30)
due.setSeconds(0)

//set the data, there are many more fields available than these
note.body = "test";

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.noetid = note.save();

note.display();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the note failed");
}


createNote
IONote  createNote( String )
Create a note, returns outlookId when created.
Parameters
String  path  the path

Returns
IONote  note IONote

Supported Clients
SmartClient

Sample
// Create a note, returns outlookId when created.
// create the note in MS Outlook
// your root folder wil always be the note folder on the client pc
var note = plugins.it2be_outlook.createNote();

// you can also create a note direct into a subfolder, seperate the folders with ':'
// var note = plugins.it2be_outlook.createNote("private:friends");

if (note) {
var start = new Date();
start.setHours(10)
start.setMinutes(0)
start.setSeconds(0)

var due = new Date();
due.setHours(10)
due.setMinutes(30)
due.setSeconds(0)

//set the data, there are many more fields available than these
note.body = "test";

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.noetid = note.save();

note.display();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the note failed");
}


createNoteFolder
String  createNoteFolder( String )
Create a note folder with the entered name.
Parameters
String  path  the path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Create a note folder with the entered name.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createNoteFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:family");
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

break;
case "get_all_folders":
// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getNoteFolders();
// When we use getNoteFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getNoteFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getNoteFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


createTask
IOTask  createTask( String )
Create a task, returns outlookId when created.
Parameters
String  path  the path

Returns
IOTask  task IOTask

Supported Clients
SmartClient

Sample
// Create a task, returns outlookId when created.
// create the task in MS Outlook
// your root folder wil always be the task folder on the client pc
var task = plugins.it2be_outlook.createTask();

// you can also create a task direct into a subfolder, seperate the folders with ':'
// var task = plugins.it2be_outlook.createTask("private:friends");

if (task) {
var start = new Date();
start.setHours(10)
start.setMinutes(0)
start.setSeconds(0)

var due = new Date();
due.setHours(10)
due.setMinutes(30)
due.setSeconds(0)

//set the data, there are many more fields available than these
task.subject = "New task via Servoy";
task.startDate = start;
task.dueDate = due;
task.responseState = plugins.it2be_outlook.type.taskResponce_WAITING;
task.status = plugins.it2be_outlook.type.taskStatus_WAITING;

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.taskid = task.save();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the task failed");
}


createTask
IOTask  createTask( )
Create a task, returns outlookId when created.
Returns
IOTask  task IOTask

Supported Clients
SmartClient

Sample
// Create a task, returns outlookId when created.
// create the task in MS Outlook
// your root folder wil always be the task folder on the client pc
var task = plugins.it2be_outlook.createTask();

// you can also create a task direct into a subfolder, seperate the folders with ':'
// var task = plugins.it2be_outlook.createTask("private:friends");

if (task) {
var start = new Date();
start.setHours(10)
start.setMinutes(0)
start.setSeconds(0)

var due = new Date();
due.setHours(10)
due.setMinutes(30)
due.setSeconds(0)

//set the data, there are many more fields available than these
task.subject = "New task via Servoy";
task.startDate = start;
task.dueDate = due;
task.responseState = plugins.it2be_outlook.type.taskResponce_WAITING;
task.status = plugins.it2be_outlook.type.taskStatus_WAITING;

//save the data. this method returns the MS Outlook ID which can be stored to
//load the data from MS Outlook later on for display purposes
globals.taskid = task.save();
} else {
plugins.dialogs.showErrorDialog("Error", "creating the task failed");
}


createTaskFolder
String  createTaskFolder( String )
Create a task folder with the entered name.
Parameters
String  path  the path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Create a task folder with the entered name.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createTaskFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:family");
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getTaskFolders();
// When we use getTaskFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getTaskFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getTaskFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getApplicationVersion
String  getApplicationVersion( )
Get the outlook version.
Returns
String  version String

Supported Clients
SmartClient


getAppointment
IOAppointment  getAppointment( Object )
Retrieve the appointment by id.
Parameters
Object  outlookId  the outlook id

Returns
IOAppointment  appointment IOAppointment

Supported Clients
SmartClient

Sample
// Retrieve the appointment by id.
// check the global appointmentid or take a stored id from the database
if (!globals.appointmentid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the appointment by the id
var appointment = plugins.it2be_outlook.getAppointment(globals.appointmentid);

// and display the appointment
if (appointment) {
appointment.display();
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the appointment!");
}


getAppointmentFolderID
OutlookFolderID  getAppointmentFolderID( )
Retrieve the ID of the (named) appointment folder.
Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) appointment folder.
// appointment (calendar) folders are also used for meetings
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getAppointmentFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getAppointmentFolderID
OutlookFolderID  getAppointmentFolderID( String )
Retrieve the ID of the (named) appointment folder.
Parameters
String  path  the path

Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) appointment folder.
// appointment (calendar) folders are also used for meetings
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getAppointmentFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getAppointmentFolders
Array<Object>  getAppointmentFolders( )
Retrieve an array of appointment folder names.
Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of appointment folder names.
// appointment (calendar) folders are also used for meetings
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:family");
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getAppointmentFolder(s);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getAppointmentFolders("private");
// When we use getAppointmentFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getAppointmentFoldersArray("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getAppointmentFolders
Array<Object>  getAppointmentFolders( String )
Retrieve an array of appointment folder names.
Parameters
String  path  the path

Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of appointment folder names.
// appointment (calendar) folders are also used for meetings
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:family");
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getAppointmentFolder(s);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getAppointmentFolders("private");
// When we use getAppointmentFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getAppointmentFoldersArray("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getAppointmentFoldersArray
Array<Array<Object>>  getAppointmentFoldersArray( String )
Retrieve an array of appointment folder names and outlookId's.
Parameters
String  path  the path

Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of appointment folder names.
// appointment (calendar) folders are also used for meetings
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:family");
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getAppointmentFolder(s);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getAppointmentFolders("private");
// When we use getAppointmentFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getAppointmentFoldersArray("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getAppointmentFoldersArray
Array<Array<Object>>  getAppointmentFoldersArray( )
Retrieve an array of appointment folder names and outlookId's.
Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of appointment folder names.
// appointment (calendar) folders are also used for meetings
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:family");
globals.folderId = plugins.it2be_outlook.createAppointmentFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getAppointmentFolder(s);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getAppointmentFolders("private");
// When we use getAppointmentFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getAppointmentFoldersArray("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getAppointmentSet
IOAppointment  getAppointmentSet( String, Array<Object> )
Retrieve a set of appointments with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IOAppointment  appointments IOAppointment

Supported Clients
SmartClient

Sample
// Retrieve a set of appointments with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the appointments
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getAppointmentSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE start>?";
// var set = plugins.it2be_outlook.getAppointmentSet(query, input);

var message = "";

// and loop through the found set. it is here that you would include your replacement like statement
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " + plugins.it2be_outlook.type.toString(set.busyStatus) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getAppointmentSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getAppointmentSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " + plugins.it2be_outlook.type.toString(set.busyStatus) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getAppointmentSet
IOAppointment  getAppointmentSet( )
Retrieve a set of appointments with an (optional) SQL statement and input array.
Returns
IOAppointment  appointments IOAppointment

Supported Clients
SmartClient

Sample
// Retrieve a set of appointments with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the appointments
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getAppointmentSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE start>?";
// var set = plugins.it2be_outlook.getAppointmentSet(query, input);

var message = "";

// and loop through the found set. it is here that you would include your replacement like statement
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " + plugins.it2be_outlook.type.toString(set.busyStatus) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getAppointmentSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getAppointmentSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " + plugins.it2be_outlook.type.toString(set.busyStatus) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getAppointmentSet
IOAppointment  getAppointmentSet( String )
Retrieve a set of appointments with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement

Returns
IOAppointment  appointments IOAppointment

Supported Clients
SmartClient

Sample
// Retrieve a set of appointments with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the appointments
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getAppointmentSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE start>?";
// var set = plugins.it2be_outlook.getAppointmentSet(query, input);

var message = "";

// and loop through the found set. it is here that you would include your replacement like statement
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " + plugins.it2be_outlook.type.toString(set.busyStatus) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getAppointmentSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getAppointmentSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " + plugins.it2be_outlook.type.toString(set.busyStatus) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getContact
IOContact  getContact( Object )
Retrieve a contact by id.
Parameters
Object  outlookId  the outlook id

Returns
IOContact  contact IOContact

Supported Clients
SmartClient

Sample
// Retrieve a contact by id.
// check the global contactid or take a stored id from the database
if (!globals.contactid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the contact by the id
var	contact = plugins.it2be_outlook.getContact(globals.contactid);

// and display the contact
if (contact) {
contact.display(true); //make the appearance modal (true) or not (false)
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the contact!");
}


getContactFolderID
OutlookFolderID  getContactFolderID( String )
Retrieve the ID of the (named) contact folder.
Parameters
String  path  the path

Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) contact folder.
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getContactFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getContactFolderID
OutlookFolderID  getContactFolderID( )
Retrieve the ID of the (named) contact folder.
Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) contact folder.
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getContactFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getContactFolders
Array<Object>  getContactFolders( String )
Retrieve an array of contact folder names.
Parameters
String  path  the path

Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of contact folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createContactFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createContactFolder("private:family");
globals.folderId = plugins.it2be_outlook.createContactFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getContactFolders();
// When we use getContactFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getContactFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getContactFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][1] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getContactFolders
Array<Object>  getContactFolders( )
Retrieve an array of contact folder names.
Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of contact folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createContactFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createContactFolder("private:family");
globals.folderId = plugins.it2be_outlook.createContactFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getContactFolders();
// When we use getContactFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getContactFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getContactFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][1] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getContactFoldersArray
Array<Array<Object>>  getContactFoldersArray( )
Retrieve an array of contact folder names and outlookId's.
Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of contact folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createContactFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createContactFolder("private:family");
globals.folderId = plugins.it2be_outlook.createContactFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getContactFolders();
// When we use getContactFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getContactFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getContactFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][1] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getContactFoldersArray
Array<Array<Object>>  getContactFoldersArray( String )
Retrieve an array of contact folder names and outlookId's.
Parameters
String  path  the path

Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of contact folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createContactFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createContactFolder("private:family");
globals.folderId = plugins.it2be_outlook.createContactFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getContactFolders();
// When we use getContactFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getContactFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getContactFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][1] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getContactSet
IOContact  getContactSet( )
Retrieve a set of contacts with an (optional) SQL statement and input array.
Returns
IOContact  contacts IOContact

Supported Clients
SmartClient

Sample
// Retrieve a set of contacts with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var city = plugins.dialogs.showInputDialog("Select city", "which city do you want to search?");

if (!city) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the contacts
// when you want to want to search a subfolder you can do 'private:friends'
var input = [city];
var query = "SELECT * FROM default WHERE businessaddresscity=?"
var set = plugins.it2be_outlook.getContactSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.firstName + " " + set.lastName + " " + plugins.it2be_outlook.type.toString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getContactSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getContactSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.firstName + " " + set.lastName + " "+ plugins.it2be_outlook.type.toString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("get all contacts", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getContactSet
IOContact  getContactSet( String )
Retrieve a set of contacts with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement

Returns
IOContact  contacts IOContact

Supported Clients
SmartClient

Sample
// Retrieve a set of contacts with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var city = plugins.dialogs.showInputDialog("Select city", "which city do you want to search?");

if (!city) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the contacts
// when you want to want to search a subfolder you can do 'private:friends'
var input = [city];
var query = "SELECT * FROM default WHERE businessaddresscity=?"
var set = plugins.it2be_outlook.getContactSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.firstName + " " + set.lastName + " " + plugins.it2be_outlook.type.toString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getContactSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getContactSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.firstName + " " + set.lastName + " "+ plugins.it2be_outlook.type.toString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("get all contacts", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getContactSet
IOContact  getContactSet( String, Array<Object> )
Retrieve a set of contacts with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IOContact  contact IOContact

Supported Clients
SmartClient

Sample
// Retrieve a set of contacts with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var city = plugins.dialogs.showInputDialog("Select city", "which city do you want to search?");

if (!city) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the contacts
// when you want to want to search a subfolder you can do 'private:friends'
var input = [city];
var query = "SELECT * FROM default WHERE businessaddresscity=?"
var set = plugins.it2be_outlook.getContactSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.firstName + " " + set.lastName + " " + plugins.it2be_outlook.type.toString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getContactSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getContactSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.firstName + " " + set.lastName + " "+ plugins.it2be_outlook.type.toString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("get all contacts", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getMail
IOMail  getMail( String )
Retrieve an email from the given folder by outlookId.
Parameters
String  outlookId

Returns
IOMail  email IOMail

Supported Clients
SmartClient

Sample
// Retrieve an email from the given folder by outlookId.
// check the global mailid or take a stored id from the database
if (!globals.mailid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the mail by the id
var mail = plugins.it2be_outlook.getMail(globals.mailid);

// and display the mail
if (mail) {
mail.display(true); //make the appearance modal (true) or not (false)
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the email message!");
}


getMailFolderID
OutlookFolderID  getMailFolderID( FolderType, String )
Retrieve the ID of the (named) email folder.
Parameters
FolderType  defaultFolder  the default folder
String  path  the path

Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) email folder.
// without any foldername/path entered you will get the root folder id
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.getMailFolderID(plugins.it2be_outlook.type.folder_INBOX);

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getMailFolderID
OutlookFolderID  getMailFolderID( FolderType )
Retrieve the ID of the (named) email folder.
Parameters
FolderType  defaultFolder  the default folder

Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) email folder.
// without any foldername/path entered you will get the root folder id
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.getMailFolderID(plugins.it2be_outlook.type.folder_INBOX);

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getMailFolders
Array<Object>  getMailFolders( FolderType )
Retrieve an array of mail/post folder names.
Parameters
FolderType  defaultFolder  the default folder

Returns
Array<Object>  Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of mail/post folder names.
// the parent folder must always be created first
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:family");
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX);
// When we use getMailFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getMailFoldersArray(plugins.it2be_outlook.type.folder_INBOX);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX, "private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getMailFolders
Array<Object>  getMailFolders( FolderType, String )
Retrieve an array of mail/post folder names.
Parameters
FolderType  defaultFolder  the default folder
String  path  the path

Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of mail/post folder names.
// the parent folder must always be created first
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:family");
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX);
// When we use getMailFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getMailFoldersArray(plugins.it2be_outlook.type.folder_INBOX);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX, "private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getMailFoldersArray
Array<Array<Object>>  getMailFoldersArray( FolderType )
Retrieve an array of email folder names and outlookId's.
Parameters
FolderType  defaultFolder  the default folder

Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of mail/post folder names.
// the parent folder must always be created first
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:family");
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX);
// When we use getMailFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getMailFoldersArray(plugins.it2be_outlook.type.folder_INBOX);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX, "private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getMailFoldersArray
Array<Array<Object>>  getMailFoldersArray( FolderType, String )
Retrieve an array of email folder names and outlookId's.
Parameters
FolderType  defaultFolder  the default folder
String  path  the path

Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of mail/post folder names.
// the parent folder must always be created first
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:family");
globals.folderId = plugins.it2be_outlook.createMailFolder(plugins.it2be_outlook.type.folder_INBOX,"private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX);
// When we use getMailFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getMailFoldersArray(plugins.it2be_outlook.type.folder_INBOX);

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getMailFolders(plugins.it2be_outlook.type.folder_INBOX, "private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getMailSet
IOMail  getMailSet( FolderType, String, Array<Object> )
Retrieve a set of email messages with an (optional) SQL statement and input array.
Parameters
FolderType  defaultFolder  the default folder
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IOMail  emails IOMail

Supported Clients
SmartClient

Sample
// Retrieve a set of email messages with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to find mail in?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the email
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getMailSet(box, query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(box, query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to get all mail from?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

// retrieve a set from the root
var set = plugins.it2be_outlook.getMailSet(box);

// or retrieve a set from a subfolder system
// var set = plugins.it2be_outlook.getMailSet(box, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getMailSet
IOMail  getMailSet( FolderType )
Retrieve a set of email messages with an (optional) SQL statement and input array.
Parameters
FolderType  defaultFolder  the default folder

Returns
IOMail  emails IOMail

Supported Clients
SmartClient

Sample
// Retrieve a set of email messages with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to find mail in?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the email
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getMailSet(box, query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(box, query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to get all mail from?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

// retrieve a set from the root
var set = plugins.it2be_outlook.getMailSet(box);

// or retrieve a set from a subfolder system
// var set = plugins.it2be_outlook.getMailSet(box, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getMailSet
IOMail  getMailSet( FolderType, String )
Retrieve a set of email messages with an (optional) SQL statement and input array.
Parameters
FolderType  defaultFolder  the default folder
String  sqlStatement  the sql statement

Returns
IOMail  emails IOMail

Supported Clients
SmartClient

Sample
// Retrieve a set of email messages with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to find mail in?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the email
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getMailSet(box, query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(box, query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to get all mail from?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

// retrieve a set from the root
var set = plugins.it2be_outlook.getMailSet(box);

// or retrieve a set from a subfolder system
// var set = plugins.it2be_outlook.getMailSet(box, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getMeeting
IOMeeting  getMeeting( Object )
Retrieve a meeting by outlookId.
Parameters
Object  outlookId  the outlook id

Returns
IOMeeting  meeting IOMeeting

Supported Clients
SmartClient

Sample
// Retrieve a meeting by outlookId.
// check the global meetingid or take a stored id from the database
if (!globals.meetingid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the meeting by the id
var meeting = plugins.it2be_outlook.getMeeting(globals.meetingid);

// and display the meeting
if (meeting) {
meeting.display(); //make the appearance modal (true) or not (false)
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the meeting!");
}


getMeetingSet
IOMeeting  getMeetingSet( )
Retrieve a set of meetings with an (optional) SQL statement and input array.
Returns
IOMeeting  meetings IOMeeting

Supported Clients
SmartClient

Sample
// Retrieve a set of meetings with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the meetings
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getMeetingSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE start>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " +  plugins.it2be_outlook.type.isString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getMeetingSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getMeetingSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " +  plugins.it2be_outlook.type.isString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getMeetingSet
IOMeeting  getMeetingSet( String, Array<Object> )
Retrieve a set of meetings with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IOMeeting  meetings IOMeeting

Supported Clients
SmartClient

Sample
// Retrieve a set of meetings with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the meetings
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getMeetingSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE start>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " +  plugins.it2be_outlook.type.isString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getMeetingSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getMeetingSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " +  plugins.it2be_outlook.type.isString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getMeetingSet
IOMeeting  getMeetingSet( String )
Retrieve a set of meetings with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement

Returns
IOMeeting  meetings IOMeeting

Supported Clients
SmartClient

Sample
// Retrieve a set of meetings with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the meetings
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getMeetingSet(query, input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE start>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " +  plugins.it2be_outlook.type.isString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getMeetingSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getMeetingSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.start + " " + set.end + " " +  plugins.it2be_outlook.type.isString(set.importance) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getNote
IONote  getNote( Object )
Retrieve a note by outlookId.
Parameters
Object  outlookId  the outlook id

Returns
IONote  note IONote

Supported Clients
SmartClient

Sample
// Retrieve a note by outlookId.
// check the global noteid or take a stored id from the database
if (!globals.noetid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the note by the id
var note = plugins.it2be_outlook.getNote(globals.noetid);

// and display the note
if (note) {
note.display(); //make the appearance modal (true) or not (false)
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the note!");
}


getNoteFolderID
OutlookFolderID  getNoteFolderID( )
Retrieve the ID of the (named) note folder.
Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) note folder.
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getNoteFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getNoteFolderID
OutlookFolderID  getNoteFolderID( String )
Retrieve the ID of the (named) note folder.
Parameters
String  path  the path

Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) note folder.
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getNoteFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getNoteFolders
Array<Object>  getNoteFolders( String )
Retrieve an array of note folder names.
Parameters
String  path  the path

Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of note folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createNoteFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:family");
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

break;
case "get_all_folders":
// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getNoteFolders();
// When we use getNoteFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getNoteFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getNoteFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getNoteFolders
Array<Object>  getNoteFolders( )
Retrieve an array of note folder names.
Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of note folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createNoteFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:family");
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

break;
case "get_all_folders":
// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getNoteFolders();
// When we use getNoteFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getNoteFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getNoteFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getNoteFoldersArray
Array<Array<Object>>  getNoteFoldersArray( )
Retrieve an array of note folder names and outlookId's.
Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of note folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createNoteFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:family");
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

break;
case "get_all_folders":
// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getNoteFolders();
// When we use getNoteFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getNoteFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getNoteFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getNoteFoldersArray
Array<Array<Object>>  getNoteFoldersArray( String )
Retrieve an array of note folder names and outlookId's.
Parameters
String  path  the path

Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of note folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createNoteFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:family");
globals.folderId = plugins.it2be_outlook.createNoteFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

break;
case "get_all_folders":
// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getNoteFolders();
// When we use getNoteFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getNoteFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getNoteFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.


getNoteSet
IONote  getNoteSet( String, Array<Object> )
Retrieve a set of notes with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IONote  notes IONote

Supported Clients
SmartClient

Sample
// Retrieve a set of notes with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select body", "what body text do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the notes
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getNoteSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

if (set) {
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.subject +"\n";
}
} else {
message = "found no records!";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getNoteSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getNoteSet("private:friends");

var message = "";

if (set) {
//and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.body +"\n";
}
} else {
message = "found no records!";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getNoteSet
IONote  getNoteSet( String )
Retrieve a set of notes with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement

Returns
IONote  notes IONote

Supported Clients
SmartClient

Sample
// Retrieve a set of notes with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select body", "what body text do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the notes
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getNoteSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

if (set) {
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.subject +"\n";
}
} else {
message = "found no records!";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getNoteSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getNoteSet("private:friends");

var message = "";

if (set) {
//and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.body +"\n";
}
} else {
message = "found no records!";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getNoteSet
IONote  getNoteSet( )
Retrieve a set of notes with an (optional) SQL statement and input array.
Returns
IONote  notes IONote

Supported Clients
SmartClient

Sample
// Retrieve a set of notes with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select body", "what body text do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the notes
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getNoteSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

if (set) {
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.subject +"\n";
}
} else {
message = "found no records!";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getNoteSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getNoteSet("private:friends");

var message = "";

if (set) {
//and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.body +"\n";
}
} else {
message = "found no records!";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getPost
IOPost  getPost( Object )
Retrieve a post by outlookId.
Parameters
Object  outlookId  the outlook id

Returns
IOPost  post IOPost

Supported Clients
SmartClient

Sample
// Retrieve a post by outlookId.
// check the global postid or take a stored id from the database
if (!globals.postid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the post by the id
var post = plugins.it2be_outlook.getPost(plugins.it2be_outlook.type.folder_INBOX, globals.postid);

// and display the mail
if (post) {
post.display(true); //make the appearance modal (true) or not (false)
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the post!");
}


getPostSet
IOPost  getPostSet( FolderType, String, Array<Object> )
Retrieve a set of posts with an (optional) SQL statement and input array.
Parameters
FolderType  defaultFolder  the default folder
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IOPost  posts IOPost

Supported Clients
SmartClient

Sample
// Retrieve a set of posts with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
// with posts we always need to define one of the four available boxes
// valid boxes for posts are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to find the post in?", "inbox", "outbox", "sent_mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the emails (posts are in the eemail folder system)
// when you want to want to search on a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getPostSet(box, query, input);

var time = new Date();
time.setMinutes(0);

// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(box, query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// with posts we always need to define one of the four available boxes
// valid boxes for posts are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to get all posts from?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

// retrieve a set from the root
// var	set = plugins.it2be_outlook.getPostSet(box);

// or retrieve a set from a subfolder system
var	set = plugins.it2be_outlook.getPostSet(box, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getPostSet
IOPost  getPostSet( FolderType, String )
Retrieve a set of posts with an (optional) SQL statement and input array.
Parameters
FolderType  defaultFolder  the default folder
String  sqlStatement  the sql statement

Returns
IOPost  posts IOPost

Supported Clients
SmartClient

Sample
// Retrieve a set of posts with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
// with posts we always need to define one of the four available boxes
// valid boxes for posts are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to find the post in?", "inbox", "outbox", "sent_mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the emails (posts are in the eemail folder system)
// when you want to want to search on a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getPostSet(box, query, input);

var time = new Date();
time.setMinutes(0);

// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(box, query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// with posts we always need to define one of the four available boxes
// valid boxes for posts are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to get all posts from?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

// retrieve a set from the root
// var	set = plugins.it2be_outlook.getPostSet(box);

// or retrieve a set from a subfolder system
var	set = plugins.it2be_outlook.getPostSet(box, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getPostSet
IOPost  getPostSet( FolderType )
Retrieve a set of posts with an (optional) SQL statement and input array.
Parameters
FolderType  defaultFolder  the default folder

Returns
IOPost  post IOPost

Supported Clients
SmartClient

Sample
// Retrieve a set of posts with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
// with posts we always need to define one of the four available boxes
// valid boxes for posts are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to find the post in?", "inbox", "outbox", "sent_mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the emails (posts are in the eemail folder system)
// when you want to want to search on a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getPostSet(box, query, input);

var time = new Date();
time.setMinutes(0);

// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(box, query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// with posts we always need to define one of the four available boxes
// valid boxes for posts are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var mailbox = plugins.dialogs.showSelectDialog("mailbox", "Which mailbox do you want to get all posts from?", "inbox", "outbox", "sent mail", "drafts")

if (!mailbox) {
return;
}

// select the correct mailbox using the 'type' node from the plugin
if (mailbox == "inbox") {
var box = plugins.it2be_outlook.type.folder_INBOX;
} else if (mailbox == "outbox") {
var box = plugins.it2be_outlook.type.folder_OUTBOX;
} else if (mailbox == "sent mail") {
var box = plugins.it2be_outlook.type.folder_SENT_MAIL;
} else if (mailbox == "drafts") {
var box = plugins.it2be_outlook.type.folder_DRAFTS;
}

// retrieve a set from the root
// var	set = plugins.it2be_outlook.getPostSet(box);

// or retrieve a set from a subfolder system
var	set = plugins.it2be_outlook.getPostSet(box, "private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += "sent: '" + set.sent +"'  on: " + set.sentOn + " " + plugins.it2be_outlook.type.toString(set.sensitivity) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getTask
IOTask  getTask( Object )
Retrieve a task by outlookId.
Parameters
Object  outlookId  the outlook id

Returns
IOTask  task IOTask

Supported Clients
SmartClient

Sample
// Retrieve a task by outlookId.
// check the global taskid or take a stored id from the database
if (!globals.taskid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// load the task by the id
var task = plugins.it2be_outlook.getTask(globals.taskid);

// and display the task
if (task) {
task.display(); //make the appearance modal (true) or not (false)
} else {
plugins.dialogs.showErrorDialog("Error", "could not display the task!");
}


getTaskArray
Array<Object>  getTaskArray( String )
Get an array with tasks
Parameters
String  path  the path

Returns
Array<Object>  tasks Object[]

Supported Clients
SmartClient

Sample
// Retrieve a set of tasks with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the tasks
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getTaskSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getTaskSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getTaskSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getTaskArray
Array<Object>  getTaskArray( )
Get an array with tasks
Returns
Array<Object>  tasks Object[]

Supported Clients
SmartClient

Sample
// Retrieve a set of tasks with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the tasks
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getTaskSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getTaskSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getTaskSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getTaskFolderID
OutlookFolderID  getTaskFolderID( )
Retrieve the ID of the (named) task folder.
Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) task folder.
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getTaskFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getTaskFolderID
OutlookFolderID  getTaskFolderID( String )
Retrieve the ID of the (named) task folder.
Parameters
String  path  the path

Returns
OutlookFolderID  id OutlookFolderID

Supported Clients
SmartClient

Sample
// Retrieve the ID of the (named) task folder.
// without any foldername/path entered you will get the root folder id
globals.folderId = plugins.it2be_outlook.getTaskFolderID();

plugins.dialogs.showInfoDialog("folder", "ID = " + globals.folderId);


getTaskFolders
Array<Object>  getTaskFolders( )
Retrieve an array of task folder names.
Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of task folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createTaskFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:family");
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getTaskFolders();
// When we use getTaskFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getTaskFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getTaskFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getTaskFolders
Array<Object>  getTaskFolders( String )
Retrieve an array of task folder names.
Parameters
String  path  the path

Returns
Array<Object>  folders Object[]

Supported Clients
SmartClient

Sample
// Retrieve an array of task folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createTaskFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:family");
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getTaskFolders();
// When we use getTaskFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getTaskFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getTaskFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getTaskFoldersArray
Array<Array<Object>>  getTaskFoldersArray( )
Retrieve an array of task folder names and outlookId's.
Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of task folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createTaskFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:family");
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getTaskFolders();
// When we use getTaskFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getTaskFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getTaskFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getTaskFoldersArray
Array<Array<Object>>  getTaskFoldersArray( String )
Retrieve an array of task folder names and outlookId's.
Parameters
String  path  the path

Returns
Array<Array<Object>>  folders Object[][]

Supported Clients
SmartClient

Sample
// Retrieve an array of task folder names.
// the parent folder must always be created first
globals.folderId = plugins.it2be_outlook.createTaskFolder("private");

// after creating the parent folder we can create the childer
if (globals.folderId) {
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:family");
globals.folderId = plugins.it2be_outlook.createTaskFolder("private:friends");
} else {
plugins.dialogs.showErrorDialog("Error", "creating the folder failed");
}

// get all children folders below the root folder
// var folders = plugins.it2be_outlook.getTaskFolders();
// When we use getTaskFoldersArray we can also retrieve the folder id.
// The returned value is a 2D (two dimensional) array.
// var folders = plugins.it2be_outlook.getTaskFoldersArray("private");

// get all children folder below the entered parent folder
var folders = plugins.it2be_outlook.getTaskFolders("private");

if (folders) {
for (var i = 0 ; i < folders.length ; i++) {
message += folders[i] + "\n";
//message += "name:" + folders[i][0] + "\nid: " + folders[i][1] + "\n";
}
}

if (message) {
plugins.dialogs.showInfoDialog("folders", message);
} else {
plugins.dialogs.showErrorDialog("folders", "there are no children folders!");

// see the sample solution for a more advanced example of how to loop through
// all folders and subfolders.
}


getTaskSet
IOTask  getTaskSet( )
Retrieve a set of tasks with an (optional) SQL statement and input array.
Returns
IOTask  tasks IOTask

Supported Clients
SmartClient

Sample
// Retrieve a set of tasks with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the tasks
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getTaskSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getTaskSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getTaskSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getTaskSet
IOTask  getTaskSet( String )
Retrieve a set of tasks with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement

Returns
IOTask  tasks IOTask

Supported Clients
SmartClient

Sample
// Retrieve a set of tasks with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the tasks
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getTaskSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getTaskSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getTaskSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


getTaskSet
IOTask  getTaskSet( String, Array<Object> )
Retrieve a set of tasks with an (optional) SQL statement and input array.
Parameters
String  sqlStatement  the sql statement
Array<Object>  input  the input array

Returns
IOTask  tasks IOTask

Supported Clients
SmartClient

Sample
// Retrieve a set of tasks with an (optional) SQL statement and input array.
// set the content of what you want to search on.
// REMARK: MS Outlook doesn't offer an 'out of the box' solution to work with a 'LIKE' statement
// searching can only be done on a full string or you will have to loop through the records to find what you need
var subject = plugins.dialogs.showInputDialog("Select subject", "what subject do you want to search?");

if (!subject) {
return;
}

// to search in MS Outlook you can create a sql statement like below
// you can either work with the input parameter and '?' to take care of the correct formatting
// or you create the statement yourself
// the 'default' table refers to the root of (in this case) the tasks
// when you want to want to search a subfolder you can do 'private:friends'
var input = [subject];
var query = "SELECT * FROM default WHERE subject=?";
var set = plugins.it2be_outlook.getTaskSet(query,input);

var time = new Date();
time.setMinutes(0);
// searching on date/time is done like below
// var input = [time];
// var query = "SELECT * FROM default WHERE creationtime>?";
// var set = plugins.it2be_outlook.getMeetingSet(query, input);

var message = "";

while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}

Return;

// retrieve a set from the root
var	set = plugins.it2be_outlook.getTaskSet();

// or retrieve a set from a subfolder system
// var	set = plugins.it2be_outlook.getTaskSet("private:friends");

var message = "";

// and loop through the result set, make sure it is not too big to avoid memory issues
while (set.hasNext()) {
var outlookId = set.getNext();

message += set.startDate + " " + set.dueDate + " " + plugins.it2be_outlook.type.toString(set.status) + "\n";
}

if (message) {
plugins.dialogs.showInfoDialog("find result", message);
} else {
plugins.dialogs.showErrorDialog("find result", "no records found");
}


itemExists
Boolean  itemExists( String )
Check by MS Outlook ID if an item exists.
Parameters
String  outlookId  the outlook id

Returns
Boolean  exists boolean

Supported Clients
SmartClient


logoff
Boolean  logoff( )
Logoff from MS Outlook.
Returns
Boolean  boolean

Supported Clients
SmartClient

Sample
// Logoff MS Outlook
plugins.it2be_outlook.logoff();

// Close the connection with MS Outlook
plugins.it2be_outlook.close();


logon
Boolean  logon( String, String )
Logon to MS Outlook with a name and password.
Parameters
String  name  the name
String  password  the password

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
try {
//register the plugin
plugins.it2be_outlook.register("code", "developer");

//open the connection to the MS Outlook application
//preferably you do this when you really need the connection
plugins.it2be_outlook.open()

//logon to MS Outlook
plugins.it2be_outlook.logon("name", "password")
} catch (e) {
application.output(e);
}


moveAppointment
String  moveAppointment( String, String )
Move an appointment to another folder. Arguments: outlookId, folder id/path.
Parameters
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move an appointment to another folder. Arguments: outlookId, folder id/path.
// you can move an appointment to another folder
// the new folder can be set via the folder id or the folder path
var outlookId = plugins.it2be_outlook.moveAppointment(record.outlookId, "private");

// moving an appointment within MS Outlook is not really moving unfortunately
// it is in fact deleting the old appointment and creating a new one!
// as a result you should save the new MS Outlook id to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


moveContact
String  moveContact( String, String )
Move a contact to another folder. Arguments: outlookId, folder id/path.
Parameters
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move a contact to another folder. Arguments: outlookId, folder id/path.
// you can move a contact to another folder
// the new folder can be set via the folder id or the folder path
var outlookId = plugins.it2be_outlook.moveContact(record.outlookId, "private");

// moving a contact within MS Outlook is not really moving unfortunately
// it is in fact deleting the old contact and creating a new one!
// as a result you should save the new MS Outlook ID to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


moveMail
String  moveMail( FolderType, String, String )
Move an email to another folder. Arguments: outlookId, folder id/path.
Parameters
FolderType  defaultFolder  the default folder
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move an email to another folder. Arguments: outlookId, folder id/path.
// you can move an email to another folder
// the new folder can be set via the folder id or the folder path
// select the correct mailbox using the 'type' node from the plugin
// available types start with 'folder_'
var outlookId = plugins.it2be_outlook.moveMail(plugins.it2be_outlook.type.folder_SENT_MAIL, record.outlookId, "private");

// moving an email within MS Outlook is not really moving unfortunately
// it is in fact deleting the old email and creating a new one!
// as a result you should save the new MS Outlook ID to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


moveMeeting
String  moveMeeting( String, String )
Move a meeting to another folder. Arguments: outlookId, folder id/path.
Parameters
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move a meeting to another folder. Arguments: outlookId, folder id/path.
// you can move a meeting to another folder
// the new folder can be set via the folder id or the folder path
var outlookId = plugins.it2be_outlook.moveMeeting(record.outlookId, "private");

// moving a meeting within MS Outlook is not really moving unfortunately
// it is in fact deleting the old meeting and creating a new one!
// as a result you should save the new MS Outlook ID to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


moveNote
String  moveNote( String, String )
Move a note to another folder. Arguments: outlookId, folder id/path.
Parameters
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move a note to another folder. Arguments: outlookId, folder id/path.
// you can move a note to another folder
// the new folder can be set via the folder id or the folder path
var outlookId = plugins.it2be_outlook.moveNote(record.outlookId, "private");

// moving a note within MS Outlook is not really moving unfortunately
// it is in fact deleting the old note and creating a new one!
// as a result you should save the new MS Outlook ID to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


movePost
String  movePost( FolderType, String, String )
Move a post to another folder. Arguments: outlookId, folder id/path.
Parameters
FolderType  defaultFolder  the default folder
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move a post to another folder. Arguments: outlookId, folder id/path.
// you can move a post to another folder
// the new folder can be set via the folder id or the folder path
var outlookId = plugins.it2be_outlook.movePost(record.outlookId, "private");

// moving a post within MS Outlook is not really moving unfortunately
// it is in fact deleting the old post and creating a new one!
// as a result you should save the new MS Outlook ID to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


moveTask
String  moveTask( String, String )
Move a task to another folder. Arguments: outlookId, folder id/path.
Parameters
String  outlookId  the outlook id
String  folderId  the folder id or path

Returns
String  id String

Supported Clients
SmartClient

Sample
// Move a task to another folder. Arguments: outlookId, folder id/path.
// you can move a task to another folder
// the new folder can be set via the folder id or the folder path
var outlookId = plugins.it2be_outlook.moveTask(record.outlookId, "private");

// moving a task within MS Outlook is not really moving unfortunately
// it is in fact deleting the old task and creating a new one!
// as a result you should save the new MS Outlook ID to your own record again
if (outlookId) {
record.outlookId = outlookId;

controller.saveData();

plugins.dialogs.showInfoDialog("Information", "record moved.");
} else {
plugins.dialogs.showErrorDialog("Error", "moving failed.");
}


open
Boolean  open( )
Open the connection to MS Outlook.
Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
try {
//register the plugin
plugins.it2be_outlook.register("code", "developer");

//open the connection to the MS Outlook application
//preferably you do this when you really need the connection
plugins.it2be_outlook.open()

//logon to MS Outlook
plugins.it2be_outlook.logon("name", "password")
} catch (e) {
application.output(e);
}


quitApplication
void  quitApplication( )
Quit outlook.
Returns
void  

Supported Clients
SmartClient


register
Boolean  register( String )
Register your runtime license (use the Components Manager to request your license string)
Parameters
String  license  the license

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// You have to register your plug-in(s) and beans before you start using them
// One way to do so is create an 'onOpenSolution' method and add the 'register(.)' method(s) there
plugins.it2be_outlook.register("Insert the license string(s) from your '*_runtime_license.txt' file here!");


removeAppointment
Boolean  removeAppointment( String )
Remove an appointment with the entered outlookId.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global appointmentid or take a stored id from the database
if (!globals.appointmentid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual appointment from MS Outlook
var result = plugins.it2be_outlook.removeAppointment(globals.appointmentid);

if (result) {
globals.outlookId = null;

plugins.dialogs.showInfoDialog("Information",  "removed the appointment!");
} else {
plugins.dialogs.showErrorDialog("Error",  "could not remove the appointment!");
}


removeAppointmentFolder
Boolean  removeAppointmentFolder( String )
Remove an appointment/meeting folder with the entered name.
Parameters
String  path  the path

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// appointment (calendar) folders are also used for meetings
// the children must be removed before removing the parent
var result = plugins.it2be_outlook.removeAppointmentFolder("private:friends");
application.output(result);
var result = plugins.it2be_outlook.removeAppointmentFolder("private:family");
application.output(result);

// now we can remove the parent folder
var result = plugins.it2be_outlook.removeAppointmentFolder("private");
application.output(result);


removeContact
Boolean  removeContact( String )
Remove a contact with the entered id.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global contactid or take a stored id from the database
if (!globals.contactid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual contact from MS Outlook
var result = plugins.it2be_outlook.removeContact(globals.contactid);

if (result) {
globals.contactid = null;

plugins.dialogs.showInfoDialog("Information",  "removed the contact!");
} else {
plugins.dialogs.showErrorDialog("Error", "could not remove the contact!");
}


removeContactFolder
Boolean  removeContactFolder( String )
Remove a contact folder with the entered name.
Parameters
String  path  the path

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// the children must be removed before removing the parent
var result = plugins.it2be_outlook.removeContactFolder("private:friends");
application.output(result);
var result = plugins.it2be_outlook.removeContactFolder("private:family");
application.output(result);

// now we can remove the parent folder
var result = plugins.it2be_outlook.removeContactFolder("private");
application.output(result);


removeMail
Boolean  removeMail( String )
Remove an email from the given folder with the entered id.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global mailid or take a stored id from the database
if (!globals.mailid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual email from MS Outlook
var result = plugins.it2be_outlook.removeMail(globals.mailid);

if (result) {
globals.outlookId = null;

plugins.dialogs.showInfoDialog("Information",  "removed the email message!");
} else {
plugins.dialogs.showErrorDialog("Error", "could not remove the email message!");
}


removeMailFolder
Boolean  removeMailFolder( FolderType, String )
Remove an email/post folder from the entered folder with name.
Parameters
FolderType  defaultFolder  the default folder
String  path  the path

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// the children must be removed before removing the parent
// with email we always need to define one of the four available boxes
// valid boxes for email are 'inbox', 'outbox', 'sent_mail' and 'drafts'
var result = plugins.it2be_outlook.removeMailFolder("inbox", "private:friends");
application.output(result);
var result = plugins.it2be_outlook.removeMailFolder("inbox", "private:family");
application.output(result);

// now we can remove the parent folder
var result = plugins.it2be_outlook.removeMailFolder("inbox", "private");
application.output(result);


removeMeeting
Boolean  removeMeeting( String )
Remove a meeting with the entered outlookId.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global meetingid or take a stored id from the database
if (!globals.meetingid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual meeting from MS Outlook
var result = plugins.it2be_outlook.removeMeeting(globals.meetingid);

if (result) {
meeting = null;

plugins.dialogs.showInfoDialog("Information",  "removed the meeting!");
} else {
plugins.dialogs.showErrorDialog("Error", "could not remove the meeting!");
}


removeNote
Boolean  removeNote( String )
Remove a note with the entered outlookId.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global noteid or take a stored id from the database
if (!globals.noetid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual note from MS Outlook
var result = plugins.it2be_outlook.removeNote(globals.noetid);

if (result) {
globals.noetid = null;

plugins.dialogs.showInfoDialog("Information",  "removed the note!");
} else {
plugins.dialogs.showErrorDialog("Error", "could not remove the note!");
}


removeNoteFolder
Boolean  removeNoteFolder( String )
Remove a note folder with the entered name.
Parameters
String  path  the path

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// the children must be removed before removing the parent
var result = plugins.it2be_outlook.removeNoteFolder("private:friends");
application.output(result);
var result = plugins.it2be_outlook.removeNoteFolder("private:family");
application.output(result);

// now we can remove the parent folder
var result = plugins.it2be_outlook.removeNoteFolder("private");
application.output(result);


removePost
Boolean  removePost( String )
Remove a post with the entered outlookId.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global postid or take a stored id from the database
if (!globals.postid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual post from MS Outlook
var result = plugins.it2be_outlook.removePost(plugins.it2be_outlook.type.folder_INBOX, globals.mailid);

if (result) {
globals.outlookId = null;

plugins.dialogs.showInfoDialog("Information",  "removed the email message!");
} else {
plugins.dialogs.showErrorDialog("Error", "could not remove the email message!");
}


removeTask
Boolean  removeTask( String )
Remove a task with the entered outlookId.
Parameters
String  outlookId  the outlook id

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// check the global taskid or take a stored id from the database
if (!globals.taskid) {
plugins.dialogs.showErrorDialog("Error", "No MS Outlook ID found");

return;
}

// and remove the actual task from MS Outlook
var result = plugins.it2be_outlook.removeTask(globals.taskid);

if (result) {
globals.outlookId = null;

plugins.dialogs.showInfoDialog("Information",  "removed the task!");
} else {
plugins.dialogs.showErrorDialog("Error", "could not remove the task!");
}


removeTaskFolder
Boolean  removeTaskFolder( String )
Remove a task folder with the entered name.
Parameters
String  path  the path

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// the children must be removed before removing the parent
var result = plugins.it2be_outlook.removeTaskFolder("private:friends");
application.output(result);
var result = plugins.it2be_outlook.removeTaskFolder("private:family");
application.output(result);

// now we can remove the parent folder
var result = plugins.it2be_outlook.removeTaskFolder("private");
application.output(result);


typeToString
String  typeToString( Object )
Retrieve the string value of the type.
Parameters
Object  type

Returns
String  String

Supported Clients
SmartClient

Sample
var type = plugins.it2be_outlook.type;
type.typeToString(type.sensitivity_CONFIDENTAIL);