You need to sign in to do that
Don't have an account?
ContentDocumentLink Issue
I may be missing the point here but I am trying to link a new document created in a Content Library using ContentVersion. That works like a champ and I am placing the document in the correct Library folder and have permissons for the folder wide open a this point. What I need to do is show a link to the newly created document directly from within the Custom Object's related lists section. I have already dragged the Related Content list section into the page layout and it gives me 3 buttons (Find Content, Search All, & Deliver Content) and I can attach the new doc this way but cannot for the life of me figure out to do this programmaticzlly using APEX. Any clues? Anybody? Thanks in advance!
Yes, Using the apex you can achive this.
firstly you need understand the links between these object - ContentWorkspace, ContentWorkspacedoc, ContentDocument, and Contentversion
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_content.htm#sforce_api_erd_content
Now In apex, write a code for insert contentversion( contentversion is file that you will upload).
then,
Contenworkspace is the Library.
Contentworkspacedoc, is the object that provides links between contentversion(contentdocument) and contentworkspace