After abort action in a form Error message is blinking and going.

Aditya253
Kilo Guru

Hi All,

 

Please help on this, I am facing this issue, I wrote abort action code on incident form, abort action is happening but I need to display Error message, for this i have used gs.addErrorMessage(); method but after abort action it is blinking and going.

 

Thanks & Regards,

Aditya 

1 ACCEPTED SOLUTION

Hi @Aditya253 

For such issues, I take a very lame method but it proves effective and time consuming.

Deactivate all the BRs on the table, and just keep this current BR active.

Then activate the BRs one by one.

You should be able to narrow down which BR upon being activated is causing this issue.

View solution in original post

12 REPLIES 12

Sagar Pagar
Tera Patron

Hi @Aditya253,

 

Try by adding error message before setAbortAction() as -

 

if(current.state == '3'){

gs.addErrorMessage('Please fill the primary details under security tab');

current.setAbortAction(true);

}

 

Thanks,

Sagar Pagar

The world works with ServiceNow

Hi Sagar,

 

I tried the above code which you have mentioned but still same issue 

Thanks & Regards,

Aditya 

Hello Aditya,

 

There must be Ui policy script on same table which clearing messages.

Please check if any UI policy script which contain "clearMessages() " .

 

It will work fine once deactivate that Ui Policy.

 

 

Thanks,

Sampat