Hi All , Can some one help me how to autohide the popup messages in ServiceNow

NagaNandini N
Tera Guru

Hi All ,

Can someone help me disable autohide the popup messages in the ServiceNow Service Catalog Form?

Please take a look at the screenshot for reference.

 

I want this message to display stable "Please allow up to 10 business days to review contracts that are not auto-generated."

 

function onLoad() {
   //Type appropriate comment here, and begin script below
g_form.addInfoMessage("Please allow up to 10 business days to review contracts that are not auto-generated.");

}    

 

 

 

2 ACCEPTED SOLUTIONS

Sainath N
Mega Sage
Mega Sage

@NagaNandini N : As you are setting the message via client side API, please refer the below article that describes all methods in details.

 

http://servicenowguru.com/scripting/ui-info-error-message-cheat-sheet/


Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

 

View solution in original post

@NagaNandini N : please follow the below HI Article that explains the implementation.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0713722

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @NagaNandini N 

 

https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server_legacy/c_GlideSystemAPI#r_GS-fl...

 

gs.flushMessages();

Use above code after your line of code 

 

Credit: @Sandeep Rajput 

https://www.servicenow.com/community/developer-forum/auto-close-service-portal-pop-up-messages/m-p/2...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Aniket Chavan
Tera Sage
Tera Sage

Hello @NagaNandini N ,

 

Please refer the code below & this is a GlideSystem method used to clear all the error, warning, and info messages that have been added to the GlideSystem message list and you can also refer the documentation shared by @Dr Atul G- LNG sir.

gs.flushMessages();

 

Let me know your views on this and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

Hi Atul,

Apologize me. I think my query might be difficult to understand.

I want this popup message to stay stable until the user closes it; if not, it should also show until the form is submitted.

I have requested how to disable the autohide popup message.

@NagaNandini N : please follow the below HI Article that explains the implementation.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0713722

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.