How to show Files uploaded in Custom Object on Community Portal using Lightning Component?

Wouldn’t it be easy if you could just have all your documents or files managed in one particular place? Today, in our attempt to make your Salesforce journey smooth, we have a solution for this! With our befitting solution, you can simply reflect all your files uploaded on the Custom Object to your portal based on the date and title.

Users who can’t log in to Salesforce have the community portal to access the information. In this solution, we have distinguished the files based on the date in MM/DD/YYYY format and its title. Here, you will have to manually add the date in the title of the document that you are willing to upload in Salesforce. It will allow external users to view the files easily and keep track of the information shared earlier.

Code

Component (Lightning Component To Display Files)

Controller (LightningComponentToDisplayFiles)

Helper (LightningComponentToDisplayFiles)

Apex controller (LightningComponentToDisplayFilesCtrl)

Conclusion

Segregation of files based on the date was never easier than this! We hope that you liked our solution. If you try out the solution for your business, then do share your valuable experiences with us. Also, do follow our social media handles to stay updated with the latest developments in the world of Salesforce. We will be back with another solution soon! Till then, happy learning! 🙂

Our Location worldwide
India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203117884
SR Tower 2nd Floor Hydel Gate Haldwani Uttarakhand 263126 +91-5946359996
USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada
HIC Global Solutions INC
43 Lafferty Lane, Richmond Hill, L4C 3N8, CA +1(262) 310-7818