current.setabortaction(true) invalid insert error message

--oooo--
Tera Contributor

Hello Experts,

I have one requirement as per the requirement everything working fine. when I used setAbortAction(true) I am getting an 'invalid insert 'OOTB error message. I don't want to show a message.

how can I achieve this please guide thank you.

2 REPLIES 2

manjusha_
Kilo Sage

@--oooo-- 

 

Invalid insert message comes from ServiceNow platform level to indicate record is not saved so we can not remove or hide it

Refer below link for more-

https://www.servicenow.com/community/developer-forum/how-to-remove-error-message-invalid-insert-on-f...

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact
 

Thanks,

Manjusha Bangale

Anurag Tripathi
Mega Patron
Mega Patron

You cannot remove it, its a feature.

You can add another message with a more meaningful reason as to why the action was aborted for the user.

 

-Anurag