How can we add the info message for all the catalogue Item?

arshukla
Tera Contributor

Want to add info message "XYZ" for all the catalogue items.

4 REPLIES 4

Dinesh Chilaka
Kilo Sage

Hi @arshukla ,

Do you want the info message in the portal or Service catalog? one more thing is that content in the info message is static?

Thanks,
Dinesh

Want for all the service catalog & info message is static

arshukla_0-1781692541123.jpeg

 

AndersBGS
Tera Patron

Hi @arshukla 

 

@you can either utilize the catalog item description or a text field / html field. If the field should be dynamic beaded on selection, then you can utilize an OnChange client script, glide Ajax and the sys_ui_message.

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/

Tanushree Maiti
Tera Patron

Hi @arshukla 

 

To display the information message "XYZ" across all catalog items, the most efficient and scalable approach in ServiceNow is to create an onLoad Catalog Client Script within a Variable Set and associate that Variable Set with the required catalog items.

This ensures the message is displayed consistently while minimizing maintenance effort and avoiding duplicate scripts across multiple catalog items.

 

1: Create a Common Variable Set

  • Navigate to Service Catalog > Catalog Variables > Variable Sets.
  • Click New and give it a name 
  • Save the record.

 

2: Create the Catalog Client Script

  • Click New and configure the following:
    • Name: Display Global Info Message
    • Type: onLoad
    • Applies on a Catalog Item view: true
    • UI Type: All
  • In the Script section, add the following code:

 

function onLoad() {

    g_form.addInfoMessage("XYZ");

}

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti