Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Case suggested knowledge article

lamarchel
Giga Expert

Hi!

In my CSM portal, in the ticket view, I would like to show the title (short_description) of the article instead of the number, but I'm not able to access the corresponding record in "kb_knowledge". It always stay empty.

 

Here is my code sample :

	var kb = $sp.getField(gr, 'u_suggested_knowledge_article');
	
	var article_complet = new GlideRecord ('kb_knowledge');
	article_complet.addQuery ('sys_id', kb.value);
	article_complet.query();
	var titre = article_complet.short_description.getDisplayValue();

Could someone help me, please? I really don't know what is wrong.

 

Thanks!

1 ACCEPTED SOLUTION

lamarchel
Giga Expert

Finally, I found my own answer.  I replaced the methods "addQuery" and "query" with the method "get" and it works now.

View solution in original post

1 REPLY 1

lamarchel
Giga Expert

Finally, I found my own answer.  I replaced the methods "addQuery" and "query" with the method "get" and it works now.