How to make Articles with 'Pending retirement' status visible to knowledge users at the Portal level

Fosii1
Kilo Contributor

I search the forum and the only solution i saw is on this link and about 3years old

https://community.servicenow.com/community?id=community_question&sys_id=07000721db98dbc01dcaf3231f961924

I dont want to go this route. Is there any other alternative ?

Thanks

Phil

 

 

 

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

 

Not fully sure if this is what you're asking, but the search source for Knowledge for the Portal is only set to look at "Published" for the workflow state, so you should be able to add a simple "OR" query to get it working how you want:

Service Portal > Search Sources > Knowledge, look for this:

find_real_file.png

can change out line 5 with:

kb.addEncodedQuery('workflow_state=published^ORworkflow_state=pending_retirement');

Please mark reply as Helpful/Correct. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

We have implemented "pending retirement" functionality or KB article using state field on kb_knowledge table.

We have configured workflow on kb_knowledge table to set different KB article states based on our requirements.

In workflow, we creat tasks for retiring kb article to different groups based on CIs on kb_knowledge table.

The state of kb article is updated to pending retirement unless task is open.

 

 

 

 

Regards,

Sachin

Allen Andreas
Administrator
Administrator

Hi,

 

Not fully sure if this is what you're asking, but the search source for Knowledge for the Portal is only set to look at "Published" for the workflow state, so you should be able to add a simple "OR" query to get it working how you want:

Service Portal > Search Sources > Knowledge, look for this:

find_real_file.png

can change out line 5 with:

kb.addEncodedQuery('workflow_state=published^ORworkflow_state=pending_retirement');

Please mark reply as Helpful/Correct. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Allen A 

 

Iam looking for the solution related to this same. but here i need retired articles to be visible. I tried with this code(kb.addEncodedQuery('workflow_state=published^ORworkflow_state=retired');  . but it is not working. is any other changes required on this script.

could you please advise me!

Regards,

Mounika 

@Allen Andreas I am in Tokyo, I don't have a knowledge record in search sources. Any inputs?