- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 08:35 AM
Hey All,
looking for some help on how to remove the "Created REQ" message for certain catalog items
We have a requirement to not display this message when a certain catalog item is submitted - I've messed around with a modified SC CATALOG ITEM widget but I just keep breaking it
Any help greatly appreciated!
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 09:11 AM
I would add a field to the catalog item record, include it in the catalog item object in the server script of the widget. And then in the controller where it calls spUtil.addInfoMessage(), wrap it in an IF condition to determine whether to trigger the notification or not.
Should be pretty straightforward to implement.
Hope that helps.
Nathan Firth
Founder and ServiceNow Architect
NewRocket, Inc.
nathan.firth@newrocket.com
http://serviceportal.io
http://newrocket.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 10:01 AM
In your condition you need to use the controller object, it'd look like this:
if (c.data.hideMessages == false) {
spUtil.addInfoMessage(t);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 10:17 AM
thanks Dylan, that helped resolve the "submitting...." issue
thanks Nathan as well - I got it working -
- for anyone else looking..
Server Script
var msgGR = new GlideRecord('sc_cat_item');
msgGR.get(data.sys_id);
if (msgGR.u_show_message == true) {
data.hideMessages = false;
} else data.hideMessages = true;
client controller just as Dylan said
if (c.data.hideMessages) {
spUtil.addInfoMessage(t);
}