Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Advanced / scripted view rules do not override user preference - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Advanced / scripted view rules do not override user preference
KB0719228

Advanced / scripted view rules do not override user preference


7924 Views Last updated : Mar 7, 2023 public Copy Permalink
KB Summary by Now Assist

Description

Advanced / scripted view rules do not override user preference but normal view rule works.

Steps to Reproduce

1) Go to Any build of Helsinki/Istanbul/Jakarta(trackui-03-03-2015_03-28-2017_1755)
2) Go to View Rules
3) Click New
4) Name it anything
Change the Table to Incident
Check the Advanced box
In the script field, add the following code:
(function overrideView(view, is_list) {
if(gs.hasRole("itil"))
answer = 'Mobile';
})(view, is_list);
5) Click Save
6) Go to incident list
7) Open any record - You're forced to Mobile as expected
8) Change the View to any other view, Password/Metrics/Major Incidents
Expectation: You're forced back into Mobile view
Actual: Your user preference is honored and you can see the view you change to.

Workaround

After carefully considering the severity and frequency of the issue, and risk of attempting a fix, it has been decided not to address this issue. We do not make this decision lightly, and we apologize for any inconvenience. If you have any questions regarding this problem, contact ServiceNow Customer Support.

 

The other ways by views can be enforced are following.

1.Navigation handler: https://docs.servicenow.com/csh?topicname=c_NavigationHandler.html&version=latest

2. SwitchView on client side: https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_GMODV3-switchView_S

3. Business Rules


Related Problem: PRB907335

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.