Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Displaying Custom mess...
Sales forum

Displaying Custom messages in Message bar

(0) ShareShare
ReportReport
Posted on by 619

I would like to show the custom messages in the Message bar like below screen shot.  It is the global message bar.  Is it possible to show only for particular form.

And I tried the error messages showing in form notification, I got the notification like below screen shot.  Whether can I modify the background color depending upon the message type (Error, Warning and Information).

Categories:
  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Displaying Custom messages in Message bar

    You can modify the css file that comes with the Notify,js solution.

    That will however do it for all your notifications.

  • Saratha Profile Picture
    Saratha 619 on at
    RE: Displaying Custom messages in Message bar

    Thanks Aric for clarifying my doubts.   Can I change the background color of notification.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Displaying Custom messages in Message bar

    Hi Saratha,

    The Notify.js is probably the best/only way that you can do it.

    Although it uses the DOM to create the message, it is used by thousands of developers out there, and I am pretty sure, as changes are made to D365, they (or someone) will also be updating their solution to support it.

    Hope this helps.

  • Saratha Profile Picture
    Saratha 619 on at
    RE: Displaying Custom messages in Message bar

    7536.Notification.png

  • Saratha Profile Picture
    Saratha 619 on at
    RE: Displaying Custom messages in Message bar

    Sorry.  I have attached below.   In the below notification, whether background color is customizable.  And how to integrate the link.  I got the Notify.Js pack for adding button and link.  Whether is it a permanent solution.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Displaying Custom messages in Message bar

    There is no screenshot visible...

    I am not sure if this is what you are asking, but if you have multiple forms in the entity, and you want to display the message bar only on a particular form, you can do that by checking which form you are on...

    Example:

           var frm = Xrm.Page.ui.formSelector.getCurrentItem();

           var agreementTypeCode = 0;

           if (frm != null) {

               var formLabel = frm.getLabel();

               if (formLabel.toUpperCase() == "Main Form") {

                   Xrm.Page.ui.setFormNotification("The information on this form is for internal purposes only", ...);

               }

               else

               {

               }

           }

  • Sukrut Parab Profile Picture
    Sukrut Parab 71,671 Moderator on at
    RE: Displaying Custom messages in Message bar

    your screenshot are not visible . Please use rich formatting to upload images

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,791 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,488 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans