This topic has not yet been rated - Rate this topic

Appointment.getEntitiesByType method (apps for Office)

apps for SharePoint

Published: February 26, 2013

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

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.
    });
}

Supported clients

Outlook 2013 and Outlook Web App

Library

Outlook-15.js, OutlookWebApp-15.js

Namespace

Office

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.