Blog

  • Home
  • Blog
  • Modal Windows in Dynamics 365 & Model Driven Apps Forms

Modal Windows in Dynamics 365 & Model Driven Apps Forms

20 February 2024
Using a CRM system like Dynamics 365, it's quite common to need to display modal windows to users for various reasons:

  • Displaying a message
  • Showing rich information (HTML / Power Apps)
  • Asking a question
  • Alerting based on criteria

In this article, I will present the various possible ways to display modals or messages to a user on a form.

1. Global Notifications

A modal is useful when an action has been completed, but too many modal windows can spoil the user experience. Before deciding to display one in a form, one solution to consider for showing information to a user is the "Global Notification". The user sees the message appear above the form. The message can be of type:

  • Success: in green
  • Error: in red
  • Warning: in yellow
  • Information: in blue
Remember to clear the messages once done. Otherwise, you may see them stacking up one below the other, above the form.


Link to documentation here

2. Alert Dialog

The alert dialog is the most basic modal possible with just an information. It is possible to configure the size of the window. Additionally, you can customize the title, the message of the alert, as well as the action button title. Furthermore, you can define methods in case of error or success.
Here's how to implement it below:


Link to documentation here

3. confirmDialog

The confirmDialog window is richer. Here we will be able to wait for a response from the user such as "Yes"/"No" or "OK"/"Cancel". It is still possible to configure the window size. But especially based on the response, to execute different functions.
Here's how to implement it below:



Link to documentation here

4. ErrorDialog

This type of window, as its name suggests, is designed to display error messages on the screen. The user will clearly identify that it is an error and not just a standard message.
Here's how to implement it below:


Link to documentation here

5. NavigateTo

This one is my favorite. It alone enables several possible actions with a modal window. For example, It allows displaying :

  • Table list
  • Table record
  • HTML web resource
  • Custom page

Below an example of how to open


Link to documentation here

6. Open Form

The OpenForm method will allow opening a form modally in a new tab over the currently open one.
At no point do we lose focus to use the main window. This can be useful if we need to perform operations in parallel between the two windows.


Link to documentation here

7. SidePanes

This is technically not a modal, but it can be just as interesting for displaying a record.

With SidesPanes, you can display a CRM form on the side of your currently open screen. It's quite easy to close the window once the consultation is finished.

Link to documentation here

Conclusion

Here are a few ways to display information in a form without leaving the current window. Of course, it will be necessary to exchange with the business teams before deciding which solution to choose.
I hope this article has helped you.
cookie
Cookies Consent

We use our own and third-party cookies to personalize content and to analyze web traffic.

Reject all