addInfoMessage on Knowledge Article View

MounikaS
Tera Contributor

Hello,

Does any one help me on adding info message to the articles in the kB view.

 

1 ACCEPTED SOLUTION

Sorry for delayed response but got busy with something else.

1> Change application to Knowledge Management - Service Portal

2 > Open portal page called kb_article_view

3> Clone widget Called "Knowledge Article Content"

4> add below code to cloned widget

if(knowledgeRecord.workflow_state == 'retired'){
		gs.addInfoMessage('Article has been retired');
	}

5> change widget on page from Knowledge Article Content to new cloned widget.

Screenshot that will help;

Result:

View solution in original post

23 REPLIES 23

Yes, For portal you will have to clone and modify the Knowledge Article Content widget. Make sure to add customized widget to page and remove existing widget.

Hi Mike,

Could you please Guide me with path as i don't have much idea about widget

Thanks!

Hi,

Iam not familiar with using Widgets on the new Service Portal and would appreciate it you can take me through the customization procedure for Widgets. I 've read the documentation but still couldn't get the concept clearly. I understand you first have to clone the widget and do your changes on the clone version.Could you help me to approach this.

This would be very grateful

Thank you!

Hi Mike,

I have cloned the widget, copy of the knowledge article created, may i know what i need to change as i checked there are HTML, CSS, Client controller, server script.

i don't have much idea about these widgets, could you suggest me on to approach this.

Thanks!

 

Sorry for delayed response but got busy with something else.

1> Change application to Knowledge Management - Service Portal

2 > Open portal page called kb_article_view

3> Clone widget Called "Knowledge Article Content"

4> add below code to cloned widget

if(knowledgeRecord.workflow_state == 'retired'){
		gs.addInfoMessage('Article has been retired');
	}

5> change widget on page from Knowledge Article Content to new cloned widget.

Screenshot that will help;

Result: