current.setAbortAction(true) causes the error message 'Invalid update'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2013 08:26 AM
Guys,
I got stuck with current.setAbortAction(true) in a business rule... I have a simple business rule on an incident table:
When:
Before
Update:
yes
Condition:
current.category=='Software'&& !current.hasAttachments()
Script:
gs.addInfoMessage("No attached documents found! Operation cancelled.") current.setAbortAction(true);
But this rule causes and error message 'Invalid update' when I try to save an incident without attachments and with Category='Software'. My custom info message will be displayed as well, but why 'Invalid update' is there???
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2013 07:49 PM
CapaJC is correct..... that message will always display when you abort the update using current.setAbortAction(true). The only way to get rid of that is to create a client script to remove it from the screen (I wouldn't recommend that).
The error message is a little ugly, but it does describe what happened and that the update did not occur.
If this answers your question, mark the response from CapaJC as the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2013 10:41 PM
You're right - it's very ugly. It also gives the end user absolutely no feedback about what went wrong, other than their Update did not occur - i.e. very poor UI design.
This REALLY needs to be developer/Administrator controlled, e.g. I want to:
gs.addErrorMessage("Ooops, you have entered an invalid blah");
gs.setAbortAction(true, false);
(where the second boolean is for 'show the ugly message or not').
That way, if the developer/Administrator has been lazy and hasn't provided a user friendly message, then they can use the default, or they can tailor it to be user friendly (and not ugly).
Can someone put in an enhancement request? 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2013 05:27 PM
Also forgot to mention that it can be updated via System UI -> Messages (key 'Invalid update'), to be at least a little more user friendly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2013 01:12 PM
Hello Andrew,
Were you able to find any solution for this issue?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2013 08:29 AM
No, unfortunately I didn't find any good solution for that.