Overview
Developers of model-driven apps can configure notifications to be displayed to app users as toasts or within the notification center. Here are some key points about Dataverse notifications:
- Automatic Polling: Your model-driven app automatically polls the system for new notifications and displays them to the user.
- Customizable Display: The notification sender or your system administrator can configure how the notification is shown and how it can be dismissed.
- Expiration: Notifications appear in the notification center until the recipient dismisses them or they expire. By default, a notification expires after 14 days, but your administrator can override this setting. On the other hand you can set expiry in seconds.
- User-Specific: Each notification is intended for a single user, identified as the recipient when the notification is sent. Sending a notification to a team isn’t supported; you must create notifications for each individual user.
Enabling In-App Notifications
To use the in-app notification feature, follow these steps:
- Sign in to Power Apps.
- Open the solution that contains the model-driven app.
- Select the model-driven app and choose Edit from the split menu to open it using the modern app designer.
- Open Settings and switch to Features.
- Enable In-app notifications.
- Save the settings change and publish the model-driven app.
Sending Basic In-App Notifications
Notifications can be sent using the SendAppNotification
message. While the message doesn’t currently have request and response classes in the Dataverse SDK for .NET, you can generate classes or use the underlying OrganizationRequest
and OrganizationResponse
classes. Here are some examples of how to use the API to send in-app notifications:
Client API
JavaScript
var SendAppNotificationRequest = new Example.SendAppNotificationRequest(/* Your notification details here */);
Web API
POST [Your Dataverse URL]/api/data/v9.1/SendAppNotification
{
/* Your notification details here */
}
SDK for .NET
C#
// Use the appropriate classes for request and response
var request = new OrganizationRequest("SendAppNotification");
request["Title"] = "Your Notification Title";
request["Message"] = "Your notification message goes here.";
// Execute the request
var response = service.Execute(request);
POWER AUTOMATE FLOW
Comments
Post a Comment