Outlook Web addin display Error message as information

六月ゝ 毕业季﹏ 提交于 2019-12-08 09:09:03

问题


I want to display error notification. My code is following

Office.context.mailbox.item.notificationMessages.addAsync("error", {
    type: "errorMessage",
    message: "The add-in failed to process this message."
})

it shows response as

It should be error type message.


回答1:


According to documentation on NotificationMessages object .ItemNotificationMessageType property ...

If type is ProgressIndicator or ErrorMessage, an icon is automatically supplied and the message is not persistent.

This particular client (probably Web browser or desktop Outlook) displays "info" icon for errorMessage type of notification. If you don't like "supplied" icon you may try to use InformationalMessage type for your notification, which allow you to use the icon property. This property is the reference to an icon that is defined in the manifest in the Resources section. You should be able to use any.



来源:https://stackoverflow.com/questions/48339987/outlook-web-addin-display-error-message-as-information

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!