If you go to the account / contact / custom object, we have a linked list of “linked content” (if the content is included and the linked list is added to the page layout).
My question is, are these “related content” records stored? in which object?
Using the vertex I can upload a file to the content version, but I cannot create or find an object that stores information about the corresponding content.
UPDATE
I tried to create a link to display in the "related content" section, but without success. Got error "Insert failed. First exception on line 0: first error: FIELD_INTEGRITY_EXCEPTION, you cannot create a link for this entity type via api: [LinkedEntityId]"
Any idea?
ContentVersion cv = new ContentVersion(
versionData = EncodingUtil.Base64Decode(base64BlobValue),
Title = fileName,
PathOnClient = '/'+fileName,
FirstPublishLocationId = '058900000009KcL'
);
insert cv;
//fetch ContentDocumentId
cv = [Select Id,ContentDocumentId from ContentVersion where Id = :cv.Id];
insert new ContentDocumentLink(LinkedEntityId=parentId,ContentDocumentId=cv.ContentDocumentId,ShareType='V');
** USE CASE **
, , , , " ", ( contentversion - , ), ( ), .. " " ( , contentdocumentlink, ).
- , , , /opty , /.