after selection of abort action check box in the form level getting error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2024 12:07 AM
Hi All,
after selection of abort action check box in the form level getting error message like "failed to insert record. operation against file 'sn_hr_core_case_relations' was aborted by business rule 'password issues submit verification^' business rule standard password issues submit verification". - i should not required this error message but my action should be aborted.
I have already setup a message under 'add message' checkbox which is required to me.
Could some one help me on this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2024 09:57 AM
@SrinivasP If you want to display a custom error message without the system-generated message, do not use the Abort Action checkbox. Instead, use the gs.addErrorMessage() method within the script of the business rule and return false to abort the action.
BR script would be :
if (/* your condition */) {
gs.addErrorMessage("Your custom error message here.");
current.setAbortAction(true); // This aborts the action without the default system message.
return false; // Prevents further execution
}
Hope this will help you.