Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to change add alert notification background color as white in UI builder ServiceNow.

Not applicable

I want to change alert message background color as white in UI builder.
I used below script can you please help me with this:


            items: [{

                id: "alert1",

                status: "positive",

                icon: "circle-check-fill",

                content: {

                    type: "html",

                    value: "<b>" + "Your request has been submitted." + "<b>"

                },

                action: {

                    type: "dismiss"

                },

            }]
 
Thanks Upendar.
2 REPLIES 2

Tushar
Kilo Sage

Hi there,

 

  1. I think you can update the UI Builder configuration file: <servicenow_install_dir>/etc/uibuilder/configuration.json.

  2. Open the configuration file and add the CSS code inside the "css" property:

 

{
  "items": [{
    "id": "alert1",
    "status": "positive",
    "icon": "circle-check-fill",
    "content": {
      "type": "html",
      "value": "<b>" + "Your request has been submitted." + "<b>"
    },
    "action": {
      "type": "dismiss"
    }
  }],
  "css": {
    "alert-container": {
      "background-color": "white"
    }
  }
}

 

 

Save the configuration file.

 

Restart the UI builder - servicenow-uibuilder restart

 


Mark as correct and helpful if it solved your query.

Regards,
Tushar

show me the screenshot image