function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bob 11Bob 11 

File Related List in Lightning Web Component

How would turn this visulforce related list that shows files that are attached on a parent account on a service appointment record. The below code works, but doesnt look appealing and I need to add it a community.

User-added image
<apex:page standardController="ServiceAppointment">
<apex:relatedList subject="{!ServiceAppointment.Account_Name__c}" list="AttachedContentDocuments" />
</apex:page>

 
Ashish Singh SFDCAshish Singh SFDC
Hi Bob,

There are few OOTB standard Lighting components provided by Salesforce which can display your related list record from Parent as well. You can edit your page using lightning app builder and then search Related list, drop it to the Page and then you can choose the Parent Record and the section you want to display.

User-added image


User-added image

Also if you still want to go custom then watch out FILE RELATED LIST IN LIGHTNING WEB COMPONENT (https://salesforcecodex.com/salesforce/file-related-list-in-lightning-web-component/)

Thanks,
Ashish Singh.