How to exclude all order guides from Service Operation Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 03:58 AM - edited ‎01-06-2025 04:17 AM
We have a requirement to exclude all order guides from the Service Operations Workspace.
Currently, the out-of-the-box functionality displays both catalog items and order guides when we click on the 'Create Request' UI action on the Interaction form in the Service Operations Workspace. However, our requirement is to display only catalog items, excluding order guides, in the Service Operations Workspace.
How can we achieve this customization?
UI Action Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 05:17 AM
@Ankur Bawiskar
Added the log and checked, it's not going inside 'if'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 05:36 AM
Can you print what came in the URL?
var url = gs.action.getGlideURI();
gs.info('URL is' + url);
if (url.toString().indexOf('/now/sow/record/') > -1)
answer = false;
else
answer = true;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 11:46 PM
@Ankur Bawiskar
I am getting below output:
*** Script: URL issys.scripts.do?doc=%2f**%0a+%0a*+Description%3a+%240%0a+%0a*+Parameters%3a+%0a+%0a*+Returns%3a%0a*%2f%0a+&for=for+(var+i%3d0%3b+i%3c+myArray.length%3b+i%2b%2b)+%7b%0a+%2f%2fmyArray%5bi%5d%3b%0a+%0a%7d%0a%0a+&go_to_input_=&info=gs.addInfoMessage(gs.getMessage(%22%240%22))%3b&method=%2f*_________________________________________________________________%0a+++*+Description%3a%0a+++*+Parameters%3a%0a+++*+Returns%3a%0a+++________________________________________________________________*%2f%0a+++%240%3a+function()+%7b%0a+++%0a+++%7d%2c%0a"a_managed_transaction=on&record_for_rollback=on&runscript=&script=var+url+%3d+gs.action.getGlideURI()%3b%0ags.print('URL+is'+%2b+url)%3b&sys_original.script=&sys_scope=global&vargr=var+gr+%3d+new+GlideRecord(%22%240%22)%3b%0agr.addQuery(%22name%22%2c+%22value%22)%3b%0agr.query()%3b%0aif+(gr.next())+%7b%0a+++%0a%7d%0a&vargror=var+gr+%3d+new+GlideRecord('%240')%3b%0a+%0avar+qc+%3d+gr.addQuery('field'%2c+'value1')%3b%0a+%0aqc.addOrCondition('field'%2c+'value2')%3b%0agr.query()%3b%0a+%0awhile+(gr.next())+%7b%0a%0a+%0a%7d%0a%0a+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2025 12:00 AM
what's the actual URL in log when someone visits the workspace and clicks that link?
it should have something related to workspace in it, which you can use in your script as identifier
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2025 12:27 AM - edited ‎01-08-2025 01:07 AM
@Ankur Bawiskar
When we click on 'Create Request' UI action on interaction record in SOW, the URL will be:
https://domain.service-now.com/now/sow/record/interaction/3665915fdb96a01025843ede7c96191c/sub/recor...