- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2020 07:15 PM
The business has asked if it is possible to hide unpublished knowledge articles on the Service Portal for users but not affect the back end client search. The requirement is so that users have the same experience as customers do when using the portal,
I understand the following setting within properties, but unticking this option will not allow users to search related articles within incidents etc.
Our portal has been setup to use a Typehead Search widget with SNC.SearchRequest and from what I understand there would be no way to pass a parameter into it to only return published articles as the following seems to be the only rules that can be applied
- knowledgeBase
- topic
- category
- language
- department
I might be looking at this from the wrong perspective so any help directing me to another way of doing this would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2020 06:45 PM
For anyone interested in knowing the outcome - I was looking at it the completely wrong way.
I was given a lead to look at the Service Portal -> Search Sources
In my Knowledge search source I was able to add an extra part to the encoded query - + "^workflow_state=published".
Adding this removed the results from the search and from the categories listing but had no affect on the client side.
Using ACLs or User Criteria did not work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2020 06:56 PM
Hello,
You can achieve it by creating a user criteria in "user_criteria" table and you can add this User Criteria in the "Can Read" or "Cannot Read" field on knowledge article record.
If answer is helpful mark correct!
Thanks,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2020 12:02 AM
Thank you for the response.
I will try something like the following in can read(?) to see if it will work. Do you know if the User Criteria has access to the current object? The other option I am thinking is to flip it and add it to the can not read.
checkCondition();
function checkCondition(){
if(window === null && current.getValue('workflow_state') != 'published')
return false;
else
return true;
}
I will let you know how I go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2020 06:45 PM
For anyone interested in knowing the outcome - I was looking at it the completely wrong way.
I was given a lead to look at the Service Portal -> Search Sources
In my Knowledge search source I was able to add an extra part to the encoded query - + "^workflow_state=published".
Adding this removed the results from the search and from the categories listing but had no affect on the client side.
Using ACLs or User Criteria did not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:56 AM
Hi Phil,
I was reading this thread and wanted to know where did you added the condition in script include server script you mean, do you thing you can share little more details ?
Thanks for your help!