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.

How to fetch related list record value from related list

MS17
Tera Contributor

Hi All,

In a knowledge article form, there is a related list called "Blocks", Whenever the Knowledge blocks are added to the article body, It will added to the "Blocks" related list, so I need to fetch the knowledge blocks records from the "blocks" .

How to achieve this, Can anybody help me?

Thanks in advance.

find_real_file.png

 

find_real_file.png

6 REPLIES 6

Voona Rohila
Mega Patron
Mega Patron

Hi MS

Do you need a script to query the knowledge from block record?

Can you explain in detail of your requirement/issue?


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Can you please help me with it's on urgent basis. help will be appreciated. 

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

Hi,

The idea is the attachments placed in a knowledge block to be visible in a knowledge article when that block is inserted in the knowledge article body.

Bharath kumar6
Tera Expert

You can use the script :

 

var gr = new GlideRecord("table_name");//Name of the table where Blocks are stored.

gr.addQuery("knowledge_article",current.sys_id);

gr.query();

while(gr.next())

{

gs.print(gr.kb_knowledge_block);

}

 

**considering knowledge_article field as reference field in Blocks table.