- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 03:00 PM
Hello,
I am trying to identify how to create a script that will allow for us to get a pop up message when a user means to submit a ticket to request for a particular item or items in the catalog.
For example, if they were to go in and request for a phone, is there a way to make it so that prior to submission or even on page load, they will be prompted with a message that states "this phone is blah blah blah" whatever message we wish?
I have found several solutions online but they do not deal with the Service Catalog, so I'm wondering how to achieve this? Is it a client script? Business rule?
We'd like to make it so that it could be applied to only certain catagories of items.
Thank you for any suggestions!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 03:28 PM
Hi there!
The one you're probably looking for if you want a popup is alert. A very basic OnLoad script that would show an alert could be as simple as:
function onLoad() {
alert('Hi there! I'm an alert message!');
}
This line would go into the script area of a (catalog) client script. You could associate the script with either a catalog item, or a variable set. Be sure to set the "OnLoad" type for the client script.
More details can be on scripts here:
And on UI messages here:
- http://wiki.servicenow.com/index.php?title=Client_ScriptsScripting Alert, Info, and Error Messages - ServiceNow Wiki
Or here, which is the best reference I have found for the various alerts, popups, and messages available on the service now UI:
If you really want to get fancy, this article is something I'm currently looking into:
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 02:29 PM
I definitely see your reasoning. However, I'm thinking that since implementing something at the catalog level is (to my limited knowledge) going to be such a pain, that implementing notifications on the individual item level might make more sense. You could have a variable set that you attach to every impacted item, and it contains the warning. You could even configure things so that when the price goes over a certain amount, that warning shows up.
Now you're not telling the user 'there may be approvals required for some items,' you're telling them there will be an approval required for this item. And all it requires is adding the variable set.
Here's a scenario to consider. Say, for example, that you have a laptop with options available. Each of those options could potentially impact the price of the item. This would also enable you to have (as a horrible example) a laptop bag or a service like a hard drive wipe that might use the same category as other, expensive items.
Just a thought.