addInfoMessage on Knowledge Article View

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 08:27 AM
Hello,
I'd like to add an addInfoMessage / addErrorMessage box when viewing a knowledge article - in view mode, not edit mode.
The reason is, that if someone follows a direct link e.g. from an e-mail to a knowledge article that is retired I'd like a box to appear automatically at the top of the page advising this.
At present, if you link directly to an article, a message box appears at the top saying "Exact search match". However, I'm not sure how this is called. On usual forms I'd use a client script of course, but I'm not sure how to do it from a knowledge article view (via kb_view.do).
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 12:05 AM
Hi Russ,
IMHO you can use an onLoad client script on knowledge table,to display the info/error message based on the state. I'm not sure about how to condition it based on the view.
Darshak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 12:45 AM
Hi Russ,
I tried to configure an addInfoMessage for kb_view.do without success. It's feasible, but only thru internal undocumented API and using them would probably not be recommended in the long term.
If you Retire a KB Article AND your KB under the v3 engine, using the "Retire" UI Action, the workflow field value is changed to "Pending Retirement".
In that state, the KB is still visible, but a message is displayed automatically, exactly as you require.
The "Retire" UI Action will trigger an approval request via the "Knowledge - Approval Retire" workflow, should you want to edit this behavior.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 02:41 AM
Thanks, this is interesting.
I wonder how the info message is displayed for articles pending retirement - where that code is called/stored.
I'll do some digging but this is a helpful pointer.
I suppose one other option is to have the workflow append some text to the article title when retired or in draft state.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2017 02:47 AM