- Print
- DarkLight
- PDF
Description
Sends a Teams message to a specified team.
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
teamName | Text | Yes | Target team name |
subject | Text | Yes | Message subject |
body | Text | Yes | Message body |
[date] | Date | No | Message date (Specify future for reminders) (Default = Today) |
[urgent] | Boolean | No | Mark message as urgent (Default = false) |
[attachContext] | Boolean | No | Attach context information (Default = true) |
[attachUser] | Boolean | No | Attach active user as the message sender (Default = false) |
[showMD] | Boolean | No | Display message at patient's next visit (Default = false) |
Returns
No return value.
Examples
// send an immediate message to the Scheduling team
teams.send("Scheduling", "My Subject", "Message body.");
// send a reminder message to the Nursing team in 14 days
teams.send("Nursing", "My Subject", "Message body.", tools.addDays(14));
// display a message to the provider at the patient's next visit
teams.send("Physicians", "My Subject", "Message body.", tools.now, false, true, true, true);
Remarks
The ability for your app to communicate with your organization's Teams is very powerful. This means your app can auto-generate tasks, follow-reminders, and other activities when certain criteria within your app is met. The possibilities are limitless.
Specify a date in the future to create a reminder for the receiving team as your message will not appear in their queue until the specified date.
In order to prevent too many teams messages from being generated, this function is restricted to running within the Ux.Shutdown event. This event is triggered one time when your app is closed. When used inside any other runtime event, this function will be ignored and will not generate a new teams message.
Additionally, this function will only run the first time your app is closed. Any subsequent executions of your app will ignore this function and will not generate a new teams message.