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

Pavankumar_1
Mega Patron

Hi @Aditya253 ,

can you share the script how you are aborting?

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Hi Pavan,

 

Please find the below script,

Before br, insert or update,

 

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

current.setAbortAction(true);

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

}

Thanks & Regards,

Aditya

Hi @Aditya253 ,

It is a strange behavior. I have tried your script and it is good in my case.

Try to check is it to specific table or all the tables.

Present you are using script in advanced tab but give your condition in when to run and try in actions tab check Abort action and give abort message.

Just see whether your facing same issue or not.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

Hi Pavan,

It is only for incident table, others tables working fine when I use that code

 

Thanks, 

Aditya