OfficeDev / office-js-docs-reference

Microsoft Office JavaScript API Reference
https://learn.microsoft.com/javascript/api/overview
MIT License
105 stars 63 forks source link

how to show two buttons in notification message #1984

Closed junaid042 closed 3 days ago

junaid042 commented 6 days ago

this code is simple show a notification how can I add a button with this notification like in this Image image

for more info see this

let message: Office.NotificationMessageDetails;
     message = {
            type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,
            message: "Enter Your Message here",
            icon: "Icon.80x80",
            persistent: true,
        };
       // Show a notification message.
    Office.context.mailbox.item.notificationMessages.replaceAsync("ActionPerformanceNotification", message);
AlexJerabek commented 3 days ago

Hi @junaid042,

Currently, only one action per notification message is supported (as documented in the NotificationMessageDetails.actions description. However, you could add a second notification to give your users another option.

To request support for additional notification options, please post your idea (or upvote an existing one) on the Microsoft 365 Developer Platform Tech Community.

I'm going to close this issue, since there's nothing actionable to be done in the documentation. Please let us know if you have any other questions.

junaid042 commented 3 days ago

@AlexJerabek thank you for always helping me 😍