Displaying Field Message For Variables in the Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2015 10:18 PM
I would like to set a Field Message on a catalog variable.
However I am not having any luck doing so.
I am able to get the value, set mandatory, visiblity.
I tried what was posted in the following link:
How to display error message next to a variable in the Service Catalog
Here is my code in the Catalog Client Script:
function onSubmit() {
//Type appropriate comment here, and begin script below
var assetInStock = g_form.getValue('asset_in_stock');
alert ("asset in stock: " + assetInStock);
g_form.showFieldMsg('asset_in_stock',"... Asset in Stock Message",'error');
return false;
}
Does anyone have any other suggestions?
Regards,
Mike

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2015 10:30 PM
Hi Michael,
I've just tried on below demo instance and it works fine.
https://demo005.service-now.com/login.do
Username : admin
Password : admin
Steps to test : go to catalog item->access->click try it
Please let me know if you have any questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2015 10:12 AM
Pradeep, I didn't see what you did in the demo environment, however I was able to replicate it. And Yes it does work... thanks.
However, it still doesn't work in our instance. We are running Eureka (vs. Fuji in the demo instances). Not sure if that should make a difference?
Mike

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2015 10:40 AM
Hi Michael,
I've tried this on Eureka too and it works. Can you try to create a new test catalog item in your instance and check if this issue replicates for all or is it for only one catalog item.
If you still face issues, I would recommend you to raise a HI ticket.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2015 11:03 AM
OK thank you for your help.