Retired Knowledge articles in Global search

harishdasari
Tera Guru

Hi,

can anyone help me, how can I make the retired knowledge articles not to be visible in Global search.

Actually service desk users are able to view retired knowledge articles by entering the number in global search.

can anyone please provide me the solution.

I have tried creating READ ACL on kb_knowledge table, but no use.

find_real_file.png

Thank you.

46 REPLIES 46

Ulrich Jugl
ServiceNow Employee
ServiceNow Employee

antin.s I don't feel   '123TEXTQUERY321=xxxxxxxxx' is a good idea to check in the encoded query. The reason for it is, that using the "text" search on a list, will use the same encoded query and will fail to display any results though.


Hello Antin,

 

I was reading your reply and I'm trying the below business rule to stop the global search from pulling backs retired or expired kb docs.  This is working but we also have a link that specifically shows retired kb articles and would like the allow them to see the retired/expired articles through this link but not on the global search.

 

Do you know how we could accomplish this?

 

function onBefore(current, previous) {
//This function will be automatically called when this rule is processed.
// It is being used to work around PRB627409 where retired articles are being pulled back by knowledge search
// First we grab the URL and turn it into a string
var action = gs.action.getGlideURI().toString();
// Next we check to see if "textsearch.do" is in the URL and if so we exclude retired kb_knowledge records
if(!gs.hasRole("knowledge_admin") || !gs.hasRole("knowledge_manager") && gs.isInteractive() && action.search("text_search_exact_match.do" > -1)) {

//current.addEncodedQuery("workflow_state!=retired^ORvalid_to>javascript:gs.endOfYesterday()");


current.addQuery('valid_to', ">", gs.endOfYesterday());
current.addQuery('workflow_state','!=','retired');
}
}

Community Alums
Not applicable

Hi Harish,



I also have similar problem. Created HI ticket and waiting for their updates. Meanwhile as a workaround, you can try to create a business rule to move the retired article to a different Knowledge Base which basically do not have access to anyone. That way you can hide from the users.



Prakash



PS: Please mark it as Helpful if you find so.


Hi Prakash,



I have the workaround for this issue and it got fixed. If you dont get any update from them let me   know I can give you the business rule to fix this issue.



Thanks


Hello Harish ,



Can you please provide me the BR which you have executed to get out of this trouble.



Thanks .