Giter VIP home page Giter VIP logo

toast-notification-framework-d365's Introduction

PowerApps Dataverse PowerAutomate PowerBI PowerPages PowerVirtualAgents

Toast Notification Framework for Dynamics 365

Summary

My goal with this project was to create tool that non-developers could use to create, edit, dispatch and disable in-app/toast notifications in Dynamics 365.

For more information on the in-app notification feature please see the below links:

MS Learn - Send in-app notifications

MS Learn - Notification (appnotification) table/entity reference

๐Ÿ“ฃ ๐Ÿ“ฃ ๐Ÿ“ฃ For a more detailed walkthrough of the project please see my blog post: https://tldr-dynamics.com/blog/toast-notification-framework-dynamics-365

Demo

Usage

[1] Enable the toast notification feature within model-driven apps

In order to view toast notifications in a model-driven app you must first enable the feature in each app. You can do so by navigating to the settings of your model-driven app, select Features and turn on In-app notifications. For more information please see one of my earlier blog posts here.

[2] Import solution

Managed and unmanaged solutions are included in solutions folder

[3] Provide security roles to users

Certain privileges are required in order to use in-app notifications in Dynamics. Those privileges are applied to roles included within the solutions folder so feel free to use those roles or merge with your own. The privileges for the Toast Notification Reader role are required to allow users to manage their in-app notification settings within a model-driven app. I recommend using Jonathan Daugaard's "Users, Team and Security Role Report" XrmToolBox plugin to bulk apply the reader/contributor roles as necessary.

  • Toast Notification Administrator
  • Toast Notification Contributor
  • Toast Notification Reader

[4] Creating a toast notification

Navigate to the tldr-dynamics model driven app and select toast notification messages then add new from the ribbon.

Complete all required fields:

  • Name: This is the toast notification name and what will be used when naming the plugin message. This is not custom-facing
  • SDK Step Type: Select Create or Update indicating what message the background plugin should be registered with
  • SDK Step Target Entity: The schema name of the table that will trigger the toast notification message
  • SDK Step Trigger Fields (comma-delimited): For update messages, provide schema names for fields that should trigger the notification on update
  • SDK Step Trigger Filter (xml): Provide an XML filter that will be used to test the target record meets certain criteria. If not, the alert will not be sent.
  • Toast Notification Title: Customer-facing title of the toast notification. Limited to 30 characters as that is when truncation will kick in on UI. Supports markdown.
  • Toast Notification Priority: Normal or high
  • Toast Notification Icon: Determines icon to be displayed on notification (info, success, failure, warning and mention).
  • Has URL Action: Enables link to target record
  • Toast Notification Body: Supports markdown and {{handlebars}} syntax. One can provide field schema names in handlebar syntax in order to provide formatted values for field types like lookup, currency, etc.

Using an XML filter trigger If you would like the message to be triggered only when certain criteria are met (i.e. account of certain types, etc) provide XML filter to the toast notification message. An easy way to get this is to write your query in advanced find and export the fetch XML from there. When you have done that, grab the filter and add it to the toast notification message. On the backend your input would be added like this:

Disabling a toast notification Simply deactivating the toast notification message record will deactivate the corresponding sdk processing step message in the background

Uninstalling the solution If you have created toast notifications already and would like to uninstall the managed solution, unregister the SDK message processing steps underneath the plugin Tldr.ToastNotificationFramework.ToastNotificationInvoked in the plugin registration tool

[5] Validating the notification was created

If you would like to confirm that your toast notification was created, navigate to https://yourcrm.crm.dynamics.com/api/data/v9.2/appnotifications

To provide suggestions or feedback please create an issue in this repo and I will respond as soon as I can

toast-notification-framework-d365's People

Contributors

tcorcor1 avatar

Stargazers

Tobias Spens avatar  avatar Sascha Kuntze avatar  avatar

Watchers

 avatar Rardo avatar  avatar

Forkers

kokulan365

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.