Referring below post:


I came to know I can display knowledge articles like attachment like this in classic

<apex:outputLink value="/servlet/fileField?entityId= {!FAQ__kav.Id}&field=Attachment_1__Body__s">
<apex:outputfield value="{!FAQ__kav.Attachment_1__Name__s}"/>

How can I do it Lightning Knowledge. How can I display attachments in Lightning.

I read below documents:


For Lightning Knowledge:

Files are stored in the standard Files Object and attached in the files related list

i Need to use salesforce files(that content version).how can I filter it based on knowledge Id

  • Yes but I need to filter it based on Knowledge Id how can I do that? – Annappa Jan 28 '19 at 10:07

You have to query ContentDocumentLink table for ContentDocumentId by passing your knowledge id as LinkedEntityId


SELECT ContentDocumentId FROM ContentDocumentLink where LinkedEntityId ='ka01l0000008SflAAE'

And the url to view it will be


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.