Export (0) Print
Expand All

Appointment.getEntitiesByType method (JavaScript API for Office)

apps for Office

Gets an array of entities of the specified entity type found in an appointment.

Last modified: March 03, 2015

Hosts:Outlook

App type: Mail

Available in requirement sets

Mailbox

Last changed in Mailbox

1.0

Applicable Outlook modes

Read

See all support details

var entities = Office.context.mailbox.item.getEntitiesByType(entityType);

entityType

One of the EntityType enumeration values.

An array containing all the entities of the specified entity type found in the appointment; or null if no entities of the specified type are present in the appointment.

The following example shows how to access an array of strings that represent postal addresses in the subject or body of the current item. Note that the current item in Outlook can be a Message object or an Appointment object, both of which are derived from the Item object.

// The initialize function is required for all apps.
Office.initialize = function () {
    // Checks for the DOM to load using the jQuery ready function.
    $(document).ready(function () {
    // After the DOM is loaded, app-specific code can run.
    var item = Office.context.mailbox.item;
    // Get an array of strings that represent postal addresses in the current item.
    var addresses = item.getEntitiesByType(Office.MailboxEnums.EntityType.Address);
    // Continue processing the array of addresses.
    });
}

A checkmark (√) in the following table indicates that this property is supported in the corresponding Outlook host application. An empty cell indicates that the Outlook host application doesn't support this property.

For more information about Office host application and server requirements, see Requirements for running apps for Office.

Supported hosts, by platform

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

OWA for Devices

Office for Mac

Outlook

√ (Read mode only)

Available in requirement sets

Mailbox

Minimum permission level

ReadItem but some entities only require Restricted.

App types

Mail

Library

Office.js

Namespace

Office

Version

Changes

1.0

Introduced

Show:
© 2015 Microsoft