Execute a client script or business rule in service operations workspace only and not in native UI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 01:43 AM
Is it possible to execute a client script or Business Rule in service operations workspace(SOW) only and not in native UI?
I have seen few field messages being displayed in SOW when I am making some changes to a field, but the same in not happening in Native UI. So I thought its possible to so , but wanted to know how to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 01:49 AM
My thoughts
Client scripts
client script has view field when you uncheck global and you can mention the name of workspace view there, but remember the same view exists in native as well and if user switches the view in native, the script will run in native as well
So if you want to skip the client script, check the URL and see if it contains name of workspace (/now/sow/home)
Business rule
I don't think any such thing exists for business rules, although you can check what comes in url in business rule script using this but I don't think it's reliable
gs.action.getGlideURI().toString().indexOf('now/sow/home');
You can also check how the OOTB client scripts are handling this
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
05-09-2025 01:52 AM
Yes possible.
There is a view field on client script table.
Go to client scripts list and personalise list view and bring the 'view' field to the list.
You can filter out view is empty and see all the client scripts that are applicable for specific views. There will be few for workspace view also.
Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 02:23 AM
@Suggy
In ServiceNow we have views to differentiate the workspace and native UI and Service operation workspace uses
sow view for existing records and sow_new_record for new record. Native UI use default view, and you specify the view to apply client script on respective workspace.
Note:
If you change the view in classic view the script will run on classic also.
Mark helpful if it helps.