3

EDIT: There were two questions earlier. I figured one out. Please see below

We can have Attachment objects on custom object records but can we for example, associate a Salesforce File or Content Document(which resides in a library) to a Custom object?

I thought of creating either a lookup or Master Detail relation field in the custom Object but I could not add a lookup to either File, Content or Document.

EDIT

I know how to associate content with my custom object records. But how can I obtain this information in SOQL/ APEX?

2
  • 1
    Ok I found the answer in the Content implementation guide. na11.salesforce.com/help/doc/en/… There is a section on page 12 "Associating Content with Standard and Custom Objects" Basically a custom object page layout has a “Related Content” related list. We can add that to our custom file object page layout and then search for and associate the relevant content. Jul 2, 2013 at 19:07
  • 1
    It's great that you found the answer yourself (and came back here to let everyone else know what it was). Please post it as an answer below. This will make it clearer to others that it has been answered. It is perfectly acceptable to answer your own questions, although there will be a delay before you can accept it as the answer. Jul 2, 2013 at 19:46

1 Answer 1

1

Ok I found the answer in the Content implementation guide. na11.salesforce.com/help/doc/en/… There is a section on page 12 "Associating Content with Standard and Custom Objects" Basically a custom object page layout has a “Related Content” related list. We can add that to our custom file object page layout and then search for and associate the relevant content.

But there is a problem with this. You cannot access this related Content information in APEX code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .