Is there a way to add a warning message to an instance as shown in the image

kaustubh_pachhi
ServiceNow Employee
ServiceNow Employee

I need to add a message in the instance that should be shown in all the pages. 

i did find a instance where that is shown but i am unable to replicate it,

any ideas on how to solve this is appreciatedScreenshot 2023-10-17 at 1.30.53 PM.png

1 ACCEPTED SOLUTION

Vanderlei
Mega Sage

Hello @kaustubh_pachhihow are you?

What would be your goal in adding a message on every page?

A message on all pages can draw a lot of attention to something that is not of interest to all users of the instance, and it seems that we are talking about something that only admins would have the power to do.

I recommend two alternatives

  1. Create a data policy to leave the read-only field.
    Vanderlei_3-1697577129929.png

     

  2.  Create a Client Script to leave this field read-only and display the alert with the message
    Vanderlei_2-1697576809883.png

     

    If you really need the popup to appear on any registration page, you can use this script that points to the global table.
    It is worth mentioning that this way the popup will not appear on the record listing pages, neither on the portal nor on dashboards,
    Furthermore, it is not considered a good practice as it is a script that will always be executed, which can cause unnecessary slowness.
    Vanderlei_4-1697577334858.png

     



    If my answer helped you, please mark my answer as helpful.

     

    Vanderlei Catione Junior | LinkedIn

    Senior ServicePortal Developer / TechLead at The Cloud People

View solution in original post

2 REPLIES 2

Vanderlei
Mega Sage

Hello @kaustubh_pachhihow are you?

What would be your goal in adding a message on every page?

A message on all pages can draw a lot of attention to something that is not of interest to all users of the instance, and it seems that we are talking about something that only admins would have the power to do.

I recommend two alternatives

  1. Create a data policy to leave the read-only field.
    Vanderlei_3-1697577129929.png

     

  2.  Create a Client Script to leave this field read-only and display the alert with the message
    Vanderlei_2-1697576809883.png

     

    If you really need the popup to appear on any registration page, you can use this script that points to the global table.
    It is worth mentioning that this way the popup will not appear on the record listing pages, neither on the portal nor on dashboards,
    Furthermore, it is not considered a good practice as it is a script that will always be executed, which can cause unnecessary slowness.
    Vanderlei_4-1697577334858.png

     



    If my answer helped you, please mark my answer as helpful.

     

    Vanderlei Catione Junior | LinkedIn

    Senior ServicePortal Developer / TechLead at The Cloud People

kaustubh_pachhi
ServiceNow Employee
ServiceNow Employee

Hi Vandeli, Thank you for your response.

I need the message to be displayed on a few pages and not on every page and this is very helpful.

Thanks