We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

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
Giga 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
5x ServiceNow 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.