send
  • 30 Aug 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

send

  • Dark
    Light
  • PDF

Article Summary

Description

Sends a Teams message to a specified team.


Input Parameters

NameTypeRequiredDescription
teamNameTextYesTarget team name
subjectTextYesMessage subject
bodyTextYesMessage body
[date]DateNoMessage date (Specify future for reminders) (Default = Today)
[urgent]BooleanNoMark message as urgent (Default = false)
[attachContext]BooleanNoAttach context information (Default = true)
[attachUser]BooleanNoAttach active user as the message sender (Default = false)
[showMD]BooleanNoDisplay 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.

Restrictions Warning

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.


What's Next