Form Notifications in Dynamics 365

Visit Website View Our Posts


Form Notifications in Dynamics 365


Forms in Dynamics 365 provide end-users with a clear and structured method for which to input data.  Tabs, sections, and even embedded forms (i.e., a form within a form) give customizers a nearly endless range of configuration options to work with when designing and implementing a form structure that fits a client's needs.  Sometimes, though, it becomes necessary to display a notification to an end-user on a form when a particular condition is met.  In these cases, custom JavaScript can be leveraged to display different types of notifications, such as errors, warnings, and general information.

Note that form notifications differ from in-app notifications, which Beringer has written about here.

Basic form notification JavaScript file

To display a simple form notification, we can use the following JavaScript code:

Essentially, this code will get the current form context and monitor the name column on the form for any changes; this is done within the testNotification function.  If the value in the name column changes, the name_change function will run, which holds our three sample notifications, each of a different level (WARNING, ERROR, and INFO).  Depending on the level, we will see a different notification

icon when displayed:

Setting up our form to accept form notifications

Once we have our .js file, we need to set up the form in Power Apps to accept it.  Navigate to the form in the Power Apps form editor, then add a new Library.  Create a new Web Resource file and upload the .js file.  Provide a display and... (Read the full post on



Show Buttons
Hide Buttons