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:00 AM
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"));// remove this one
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2016 04:03 AM
But, i want this to be displayed when they are resolving the problem successfully.
Regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2016 04:04 AM
If you have problem with the UI Action adding a message, you need to look at the UI Action logic, not the Business Rule.
The UI Action will trigger when you click on it and there can be booth server and client side code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2016 04:08 AM
how can i change the logic for
if (typeof window == 'undefined')
serverReopen();
to work as per my logic?
could you please help me on this?
Thanks and regards,
Swamy