问题
Is there a way in the compose form of an Outlook Add-In (office.js) to check if the object behind the form (in my case a calendar event) is already saved?
回答1:
Check the ItemId; if it's undefined the message was not stored, and if it exists the message is from Draft. Please refer to Office.context.mailbox.item.itemId
EDIT: I don't want to delete the answer completely, because of the valuable input in comments from Tim Wan. Basically there is no way to identify if message was persisted on the Exchange and check for the ItemId doesn't work in compose forms.
来源:https://stackoverflow.com/questions/43259731/outlook-js-addin-compose-form-how-to-check-if-the-event-message-is-saved