Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Outlook] (Smart Alerts) Document dialog improvements #4935

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Copy link
Contributor

Learn Build status updates of commit 07d1e49:

✅ Validation status: passed

File Status Preview URL Details
docs/outlook/onmessagesend-onappointmentsend-events.md ✅Succeeded View
docs/outlook/smart-alerts-onmessagesend-walkthrough.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:


> [!TIP]
> When you configure a button in the Smart Alerts dialog to open a task pane or run a function, a button for the implemented add-in command is also added to the ribbon or action bar of the Outlook client. Use the `contextData` option to distinguish when a user runs the add-in command from the Smart Alerts dialog.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually only true for running a function. If the commandId provided by the developer is to open a taskpane, then they don't need an additional button displayed in the ribbon. This is not new to this feature; this required when invoking a function command from the Smart Alerts dialog.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

<span id="add-attachment" class="ms-Button-label">Add and send</span>
```

> [!TIP]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the best place in the docs to do it, but we should document the fact that when calling sendAsync from a function command (not taskpane) the developer should only call event.completed() on the failure callback of the sendAsync API. This is because when the API is successful, the item is sent and the function command (UILess command) is killed by Outlook, since there is no way of guaranteeing the function app will continue to run after the item is sent. So no need for the developer to call event.completed on a successful callback of sendAsync.

We should also make it clear that developers should not write any code after sendAsync. This is because it is not guaranteed to run, since this API sends the item and kills the Add-in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the updated behavior and your suggestion to this article and in the sendAsync Remarks section.

Copy link
Contributor

Learn Build status updates of commit 0cec42d:

✅ Validation status: passed

File Status Preview URL Details
docs/outlook/onmessagesend-onappointmentsend-events.md ✅Succeeded View
docs/outlook/smart-alerts-onmessagesend-walkthrough.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@@ -1,7 +1,7 @@
---
title: Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts
description: Learn about the Smart Alerts implementation and how it handles the OnMessageSend and OnAppointmentSend events in your event-based Outlook add-in.
ms.date: 12/03/2024
ms.date: 01/07/2024
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this date? Did you mean to change the year to 2025 too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! I thought I had fixed the year in the PRs, but it looks like I missed one. This date is just a placeholder. When we're ready to publish, I'll update it again.

@@ -624,14 +693,16 @@ If you implemented the optional steps to customize the **Don't Send** button or

![Dialog with a customized Don't Send button requesting the user to add an attachment to the message.](../images/outlook-smart-alerts-custom-button.png)

//TODO - Add screenshot with Take Action implementation.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you intend to add this screenshot now or later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be added later before we publish.

@@ -651,6 +722,8 @@ If you implemented the optional step to override the send mode option at runtime

![Smart Alerts dialog with the Send Anyway option available at runtime.](../images/outlook-smart-alerts-send-mode-override.png)

//TODO - Update screenshot to include Don't Send option.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question here

Copy link

@Oleg-O Oleg-O left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some minor comments; not sure if those are "must fix" for this PR..

Copy link
Contributor

Learn Build status updates of commit b6fdaf4:

✅ Validation status: passed

File Status Preview URL Details
docs/outlook/onmessagesend-onappointmentsend-events.md ✅Succeeded View
docs/outlook/smart-alerts-onmessagesend-walkthrough.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 27557a6:

✅ Validation status: passed

File Status Preview URL Details
docs/outlook/onmessagesend-onappointmentsend-events.md ✅Succeeded View
docs/outlook/smart-alerts-onmessagesend-walkthrough.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants