ServiceNow中如何显示全部可访问记录并隐藏安全约束提示信息
Alright, let's break down how to fix this in ServiceNow. You want to show all 100 accessible rows at once and get rid of that security constraint message—here's exactly what to do:
Step 1: Configure the List to Show All Accessible Rows
First, we need to adjust the list's display settings so it loads every row you have access to, instead of paginating:
- Open the target list/table, then click the gear icon in the top-right corner. Select Configure > List Control from the dropdown.
- On the List Control page, find the Number of rows per page field. Set this to a value greater than or equal to 100 (like 100 or 200—this ensures all your accessible records load in one go).
- If there's a Show all rows checkbox, make sure it's checked (though setting a high enough row count usually does the trick on its own).
- Save the List Control changes, then refresh the page. You should now see all 100 accessible rows instead of just 40.
Step 2: Hide the "Rows Removed by Security" Message
That bottom message is a system default, but we can hide it with client-side scripting. Here are two ways to do it:
Method 1: Client Script (For a Specific Table)
Use this if you only want to hide the message on this particular table:
- Navigate to System Definition > Client Scripts and click New to create a script.
- Fill in these details:
- Name: Something descriptive like "Hide ACL Row Removal Message [Your Table Name]"
- Table: Select the table you're working with
- Type: Choose List (this ensures the script runs when the list loads)
- Paste this script into the script field:
function onLoad() { // Target the message element by its default class const messageElement = document.querySelector('.row-removed-message'); if (messageElement) { messageElement.style.display = 'none'; } }
- Save the script, then refresh your list page. The security message should be gone.
Method 2: UI Script (Global Effect)
If you want to hide this message across all tables in your instance:
- Go to System Definition > UI Scripts and click New.
- Set these properties:
- Name: "Global Hide ACL Row Removal Message"
- Check the Global box to make it apply everywhere
- Paste this script:
addLoadEvent(function() { const messageElement = document.querySelector('.row-removed-message'); if (messageElement) { messageElement.style.display = 'none'; } });
- Save the script, and from now on, no list will show that security constraint message.
Quick Notes:
- Make sure you have the right permissions (like
adminorlist_admin) to modify list controls and create scripts. - After making changes, always refresh the page to test if everything works as expected.
内容的提问来源于stack exchange,提问作者Dhanjay Bhardwaj
相关产品推荐
相关产品推荐

