Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

D365 UCI - banner warning/notification

Posted on by 125

I have a question regarding the warning or notification banner that appears in UCI.

The warning banner appears as highlighted in the image.

That notification appears automatically. I could not find any related JS code where that banner is set or called.

Is there a way to change the background color of that banner?

4555.pastedimage1593481003955v1.png

In Legacy, the background color of the banner is this:

2728.pastedimage1593481277945v2.png

Is there a way to change the background color of the warning/notification banner?

a2z

  • imranakram1 Profile Picture
    imranakram1 20 on at
    RE: D365 UCI - banner warning/notification

    Hello, I've initiated an idea related to this here Microsoft Idea · Form Notification default color change and ability to customize it (dynamics.com)

    Please vote if you agree!

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: D365 UCI - banner warning/notification

    Hi a2z,

    Having searched many links and pages in recent days, I am afraid that currently there is no OOTB setting for us to change their color.

    Regards,

    Clofly

  • a2z Profile Picture
    a2z 125 on at
    RE: D365 UCI - banner warning/notification

    I did something very similar to what you did as a last resort.

    However, I am trying to minimize or limit unsupported change and have instead informed the clients the banner colour is OOTB.

    Thanks

    a2z

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: D365 UCI - banner warning/notification

    Hi a2z,

    Currently there is no OOB setting for us to change the background color of the warning/notification banner.

    You could change color with unsupported way, but the JavaScript function should be added to each form.

    My method is by injecting a custom CSS style node into HTML/document, the node contains rules to overwrite background color of banners, banner elements are selected by id and attribute selector.

    function createStyle() {
        var customStyle = '#footerWrapper > div { background-color: #fab1a0!important }';
        customStyle  = ' div[role="alert"] > li { background-color: #74b9ff!important }';
        var css = document.createElement('style');
        css.type = 'text/css';
        css.innerHTML = customStyle;
        parent.document.head.appendChild(css);
    }

    Result:

    1781.pastedimage1593496916163v1.png

    Regards,

    Clofly

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: D365 UCI - banner warning/notification

    As far as I know there is no supported way to do this.

  • a2z Profile Picture
    a2z 125 on at
    RE: D365 UCI - banner warning/notification

    Thanks Aric. I am aware of the setFormNotfication but that banner appears automatically for inactive records.

    But my question is about that banner that is shown for inactive records. Can that banner background color be changed? Can someone confirm that this can't be changed?

    Thanks

    a2z

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: D365 UCI - banner warning/notification

    That banner is only shown for Inactive records.

    When you display your own banners such as Information, Warning and Error banners you can use the setFormNotification and clearFormNotification functions:

    docs.microsoft.com/.../setformnotification

    These are the notifications you will see on the form. You pass the message, level and unique id. The level specifies the icon that will be displayed for INFO, WARNING or ERROR. The unique id is used for when you want to clear it.

    You can also use the Global Notification which is systemwide.

    docs.microsoft.com/.../addglobalnotification

    Hope this helps.

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 Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

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... 290,936 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,378 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans