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
Sandeep Rahul PVSandeep Rahul PV 

While creating ContentVersion record it is getting assigning to User record automatically

User-added imageWithout any knowledge, user record id got assigned to LinkedEntityId in ContentDocumentLink object what is the issue
Suraj Tripathi 47Suraj Tripathi 47
Hi Sandeep,
Greetings!

When you create a record in ContentVersion, then the record is stored in ContentDocument.
To link between user and document, there is a junction object called ContentDocumentLink.
In ContentDocumentLink, there is ContentDocumentId (The id of document from ContentDocument) and LinkedEntityId (The Id of the Linked Entity like Account, Contact, Opportunity, etc.)

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi