Posts

Showing posts from August, 2023

Vlocity Facts #26 || Can we display files with out using LWC and file related list?

 Yes we can display the files with out using LWC but we need to write triggers and we can display with the help off Flexcard. When we upload a file it will create 3 records. Content Version -- where the version of the file stores. ContentDocument is the parent object of ContentDocumentId, ContentVersion where it can store the versions of the file. ContentDocumentLink -- It will be the link between the Parent object [LinkedEntityId] and the ContentDocument object To achieve our task we need to have the link of the file and it is should be download url. ContentDistribution Object Represents information about sharing a document externally.  First when ever a ContentDocumentLink record is created we need to make the record Visible to all users. trigger MakeFileVisible on ContentDocumentLink (before insert) { for(ContentDocumentLink l:Trigger.new) {        l.Visibility='AllUsers'; } } and after the ContentDocumentLink is created we can create the ContentDistribu...