How to clear the info Message after Submit.

Sandeep135
Kilo Contributor

We have onChange Client Script  that adds an info message when a incident moves to State is On Hold and On Hold Reason is Pending Client Action.

 We trying clear that info Message after the save or update. Our Current Approach is an onSubmit Client Script using clearMessages  but this not achieving  the desired effect. We tried onLoad Client Script instead but no effect.

 

Please find the attachments of the scripts.

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You need to use below to hide all messages in client script.

 

g_form.hideAllFieldMsgs();

 

Regards,

Sachin

We tried this on our onSubmit Client Script it didn't work. Please look at the attachment.

dvp
Mega Sage
Mega Sage

Can you try by adding below if loop in the onChange client script

   if (isLoading || newValue == '') {
       g_form.hideFieldMsg('comments', true);
      return;
   }

Sandeep135
Kilo Contributor

The comments portion of the Client Script is unrelated. it is simply trying to make the field mandatory prior to submission and and not mandatory after submission.