How to remove info messages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2016 03:56 AM
Hi All,
I have written an before update business rule to make the changes not saved if particular condition matches at the time of closure. It is working as expected. it is throwing some error message so that user can check the reason, but along with the error message i am getting "Problem resolved" message also which was mentioned in "Resolve problem" UI action .
Business rule logic:
current.setAbortAction(true);
current.state = previous.state;
gs.flushMessages();
gs.addErrorMessage('This ticket can not be closed until the related '+itcc.number+ ' is closed');
action.setRedirectURL(current);
if (typeof window == 'undefined')
serverReopen();
function serverReopen() {
// Set Incident state to active, update and reload the record
current.state = 11;
current.update();
gs.addInfoMessage(gs.getMessage("Problem resolved"));
action.setRedirectURL(current);
}
Please helpme to overcome this issue.
Thanks and regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2016 04:05 AM
Hi
Can you just comment the line and try
gs.addInfoMessage(gs.getMessage("Problem resolved"));
Thanks
Pradeep D J
PS - Please mark Helpful, Like, or Correct Answer if applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2016 05:04 AM
It's probably this line you need to change, but if you comment it it'll never show, instead you'll have to put in logic to only post the message when there are no other errors being triggered.