Freigeben über


Office.MailboxEnums.ActionType enum

Gibt den Typ der benutzerdefinierten Aktion in einer Benachrichtigung an.

Hinweise

[ API-Satz: Postfach 1.10 ]

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml

// Adds an informational message with actions to the mail item.
const id = $("#notificationId").val().toString();

const itemId = Office.context.mailbox.item.itemId;
const details = {
  type: Office.MailboxEnums.ItemNotificationMessageType.InsightMessage,
  message: "This is an insight notification with id = " + id,
  icon: "icon1",
  actions: [
    {
      actionText: "Open insight",
      actionType: Office.MailboxEnums.ActionType.ShowTaskPane,
      // Identify whether the current mail item is in read or compose mode to set the appropriate commandId value.
      commandId: (itemId == undefined ? "PG.HelpCommand.Compose" : "PG.HelpCommand.Read"),
      contextData: { a: "aValue", b: "bValue" }
    }
  ]
};

Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult);

Felder

ShowTaskPane = "showTaskPane"

Die showTaskPane Aktion.