FYI- Related knowledge Article on Record Producer (HR PORTAL) does not work properly if the article is marked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2019 09:45 AM
STEPS TO ATTACH KB ARTICLES TO RECORD PRODUCER
- Navigate to the record producer associated to the catalog item. The easiest way is through the HR Administration > HR Services > Manage HR Catalog path in the nav bar and then clicking the "Edit catalog item" button that appears when hovering over a catalog item.
- Add a new variable to the record producer.
- Create the new variable as Type = Macro. The order number will determine where the KB Articles will appear on the page in relation to the other variables. The Widget selected under the Default Value tab will be "HRI Catalog to KB Article Display".
- Navigate back to the Manage HR Catalog module and click the "Manage KB articles" icon that appears when hovering over a catalog item.
- Create new records on this table to assign the necessary Knowledge Articles to their respective Catalog Items.
- Test your changes by navigating to your catalog item on the portal. The new widget with the catalog items should appear as shown in the screenshot below.
--------------------------------------------------------------------------------------------------------------------------------------
ISSUE :- Related knowledge article on HR Service Form/record Producer(HR PORTAL) does not work properly for end-users if the knowledge article is updated/retired.
It works fine for admins but for end users(no knowledge roles) it does not. Screenshots below.
1. If updated and Published with a new version - System does not show the article short description but just the icon. Screenshot attached below.
2. If Retired - System still shows the article even if it is retired.
Updated Article Screenshot (Version V2)
Portal View (Admin vs End User)
Article name is missing for end-user.
--------------------------------------------------------------------------------------------------------------------------------------
SOLUTION:-
Linking Between KB Articles and Record Producer/Catalog Items is handled in table "Catalog Item to KB Links [sc_2_kb]".
Create an after(insert/Update) Business rule on Knowledge [kb_knowledge] table with appropriate filters. E.g. workflow is Published/retired and update the record in sc_2_kb table with the updated version of of the KB article or delete the record if the article is retired.
It works fine for End user in both the cases Published and Retired.
Here is the simple code:-
(function executeRule(current, previous /*null when async*/) {
var gr= new GlideRecord('sc_2_kb');
gr.addQuery('kb_knowledge.number',current.number);
gr.query();
if(gr.next()){
if(current.workflow_state=='published'){
gr.setValue('kb_knowledge',current.sys_id);
gr.update();
}
if(current.workflow_state=='retired'){
gr.deleteRecord();
}
}
})(current, previous);
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 01:11 PM
I tried to do this in Orlando for a custom (non HR) table. I couldn't get it to work. I can't find the table Catalog Item to KB Links [sc_2_kb].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2020 11:21 AM