How to suppress InfoMessages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2012 12:31 PM
Hi,
We are using textsearches on our knowledge base (using GlideRecord with gr.addQuery('123TEXTQUERY321', search);
This however produces InfoMessages like "Your text query contained only common words or ambiguous wildcards, please refine your search and try again" (propably put there by gs.addInforMessage()
I would like to suppress those messages. gs.getInfoMessages() does only give you the information stored in the session, but I would like to erase them afterwards so they are not displayed to the user.
Any ideas?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2012 03:34 PM
I'm looking for the same thing. Let me know if you find anything, I'll do the same.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2012 04:18 PM
I just figured out a solution for my problem that may help you. There is a 'gs.flushMessages();' call that you can make to clear any existing info messages and prevent them from being displayed. The challenge is going to be finding the right place to put the code so that it will eliminate the messages. In your case you might have to hack the UI pages and macros from the KB to make it work. Here's a link to the info message doc I created to explain this, and other info message calls.
http://www.servicenowguru.com/scripting/ui-info-error-message-cheat-sheet/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2012 11:04 AM
This did the trick, thanks for the solution Mark!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2014 12:46 PM
Hi mark.stanger
I am trying to search all fields including the activity log so I went to All Incidents then filtered to Keywords and put in voicemail and password, I received the two informational messages:
"The search text "and" contains only very common words, please refine your search and try again"
"The search text "password" contains only very common words, please refine your search and try again"
How do I get a listing of what the common words are and any idea on how to eliminate these messages"?