Office.MailboxEnums.ActionType enum
Specifies the type of custom action in a notification message.
Remarks
Examples
// 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);
Fields
ShowTaskPane = "showTaskPane" | The |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins