Business rule not displaying Error Message on Record Insert on HR table when insert action is abort

vivek72
Tera Guru

Hi,

 

I am trying to display an error message via below code in a BR on HR Case table, when some conditions are passed.

 
gs.addErrorMessage('test');
current.setAbortAction(true);

 

However, instead of printing error message, system showing 'Failed to insert a record...' along with BR name.

Instead of this I just want to display error message and insert action should be aborted.

 

Please let me know how to ensure end user doesn't see this BR name and just see what I want to display via addErrorMessage.

 

Thanks,

Vivek

2 REPLIES 2

MD HOSSIN
Tera Contributor

You can try creating an onSubmit client script for data validation, show display messages, and avoid the update in the record.

ok thanks @MD HOSSIN .

Issue here is that I have noticed many examples where BR works fine for such a use case.

Custom Message appears first and then action is aborted.

Not getting how to disable that OOB message for abort action and why it doesn't come for some use cases.

 

does it has to do anything with insert or update ?

I have seen it working fine on update BR for 1 user case.