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
Raman-OHRaman-OH 

Associating a Custom Object Instance with CRM Content Progrmatically

 

 

I thougt that the steps to code would be 

 

1)Create a record in ContentDocument and ContentDocumentVersion record

 

2)Create a record ContentDocumentlink with ContentDocumentId as the Id from Step 1 and the LinkedEntityId as the Id of the custom object instance we want to link the content to .

 

In order to verify that the above need to be done while adding content to custom object programmatically ,  I attached content for a custom object using "Related Content" related list . 

 

However , I found there was no linkage between the object Id and the ContentDocument Id in ContentDocumentlink  table.  Hence the step 2 above may not be correct .

 

Which table maintains the relationship between an Custom Object and a CRM Content ?