need to add an error message so it displays on the employee center when i access a certain RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I need to add an error message so that it displays on a RITM ticket when accessing it from the employee center. When I use g_form.addErrorMessage() in a Catalog Client Script it works and displays the red error popup message in the native UI, but it does not work when viewing a RITM ticket from the employee center. I have the type on the catalog client script set to 'All' and I have tried just setting the type to Mobile / Service Portal and did not work either. I have tried spUtils.addErrorMessage and that did not work either. Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Ross Drew
- Open your Catalog Client Script.
- Ensure Applies on Requested Items is checked.
- UI type: All
- Table: sc_req_item
- Modify your script to use showFieldMsg:
function onLoad() { g_form.showFieldMsg('variable_name', 'Your custom error message here.', 'error'); // Replace 'variable_name' with your actual catalog variable }
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I tried that as well....no luck!