I want to dismiss the info message after 5 seconds

Deepika Mishra
Mega Guru

HR Agent Workspace

I have a button Send Email which on clicking processes the email and it shows a message "Email Sent"

My requirement is to make this message dismiss after 5 seconds, how to implement the same.

 

DeepikaMishra_0-1722425379604.png

 

As per my understanding this looks like OOB feature, so how can one make it dismiss. Please help me on the same.

3 REPLIES 3

SN_Learn
Kilo Patron
Kilo Patron

Hi @Deepika Mishra ,

 

Please check the below references:

 

Clear error message (gs.addErrorMessage();) after X seconds 

Make an warning message disappear after 5 seconds 

addMessage popup 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @Deepika Mishra ,

 

you can add the below line after your g_form.addinfoMessage();

window.setTimeout(g_form.clearMessages, 5000); // here 5000 indicates 5000 milliseconds...

 

I hope this helps....


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

gtgauravtya
Tera Contributor

Hey , did we got the answer .

Please Answer.