
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2022 01:24 AM
Hello,
Customer wants us to remove 'Number of rows removed from this list' message from Knowledge article table hence I read somewhere that we have to write query business rule, I tried writing one sample query business rule but that message is not going, Can someone please help me with that.
Regards,
Musab
Regards,
Musab
Solved! Go to Solution.
- Labels:
-
Agent Workspace
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2022 02:14 AM
This is done successfully with query BR.
(function executeRule(current, previous) {
var allowedIds = [];
var kb = new GlideRecord('kb_knowledge');
kb.query();
while (kb.next()) {
if (kb.canRead()) {
allowedIds.push(kb.getUniqueValue());
}
}
current.addEncodedQuery('sys_idIN' + allowedIds);
})(current, previous);
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2022 01:28 AM
It is happening because of ACL'S on the table.
If you don't want that message to be displayed, you can write query BR with same configuration.
Thanks,
Murthy
Murthy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2022 01:50 AM
I know I have to write BR but when I'm replacing ACL code in BR it is not displaying even a single record and just displaying security message .
ACL Code which i disabled : answer = new global.KBScopedKnowledgeSNC().canReadArticle(current);
BR Code : // if(new global.KBScopedKnowledgeSNC().canReadArticle(current));
// {
// current.addEncodedQuery('sys_class_name!=kb_knowledge_block^kb_knowledge_base=bb0370019f22120047a2d126c42e7073^workflow_state=published');
// }
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2022 01:33 AM
Hello,
This message is very annoying.
It can be removed by effectively duplicating your ACL logic in your Before Query Business Rules.
Surely there is an easier way?!
There is a very simple way to get rid of the message for all users on all tables.
This is an all or nothing solution.
Also, the pagination will still show the total number of records including ones you do not have access to.
On the Message table [sys_ui_message], search for key="Number of rows removed from this list by Security constraints: {0}".
Then, set the Message field to be one empty space.
And the message is gone!
You may also want to consider doing this for "Number of rows removed by Security constraints: {0}" UI Message.
An alternative would be to create a new Message of that key in your Language and do the same.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Regards,
Vaishnavi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2022 03:30 AM
Hello
I'm aware about this as well thanks for the reminder though but I want to achieve this via BR , I'm writing below code which I copied from ACL but it is not working, let me know what wrong I'm doing. Screenshots are as follows.
ACL screenshot :
BR Screenshot:
Error Screenshot:
Regards,
Musab