Office.NotificationMessageAction interface
The definition of the action for a notification message.
Remarks
[Api set: Mailbox 1.10]
Minimum permission level: read item
Applicable Outlook mode: Compose or Read
Important: In modern Outlook on the web and new Outlook on Windows, the NotificationMessageAction object is available in Compose mode only.
Properties
| action |
The text of the action link. |
| action |
The type of action to be performed. |
| command |
The button defined in the manifest. |
| context |
Any JSON data the action button needs to pass on to the add-in. |
Property Details
actionText
The text of the action link.
actionText: string;
Property Value
string
actionType
The type of action to be performed. ActionType.ShowTaskPane is the only supported action.
actionType: string | MailboxEnums.ActionType;
Property Value
string | Office.MailboxEnums.ActionType
commandId
The button defined in the manifest.
commandId: string;
Property Value
string
contextData
Any JSON data the action button needs to pass on to the add-in.
contextData: any;
Property Value
any
Remarks
Important:
In Outlook on Windows, the
anytype is supported starting in Version 2402 (Build 17308.20000). In earlier versions of Outlook on Windows, only thestringtype is supported.To retrieve the JSON data, call
Office.context.mailboxitem.getInitializationContextAsync. If you create a JSON string usingJSON.stringify()and assign it to thecontextDataproperty, you must parse the string usingJSON.parse()once you retrieve it.To prevent the task pane of a notification message from relaunching if it's already open, implement a handler for the
Office.EventType.InitializationContextChangedevent. You can then pass the event arguments to thecontextDataproperty.