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
Inertia1024Inertia1024 

Custom fields for Documents

I'm just getting my feet wet with the some customization work.  And I'm looking for a way to add a few custom fields to the standard Document object (e.g. Category).  Under App Setup / Customize, I don't see any mention of Documents.  

 

If this isn't available natively, what would be the best way to create this functionality?  Is it possible to create a custom object, and use it as a "wrapper" to map to Documents?

Best Answer chosen by Admin (Salesforce Developers) 
*werewolf**werewolf*

Ispita's response pretty much says it all :).  You can't add custom fields to Documents.

 

Actually, have you considered using Content instead?  Content documents have categories (in the form of workspaces) and tags, plus they're indexed for search and generate previews.  In general they're much more useful.

All Answers

Ispita_NavatarIspita_Navatar

Salesforce does not expose documents objects like other standard objects, hence adding of custom fields to documents  is not allowed.

perhaps what you can do is create a custom object, which would act as a related object to document, but with the exception that you cannot add a lokup or master-detail relationship to document, you need to store the related document id in a text field and have custom screen to show the relation.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

 

*werewolf**werewolf*

Ispita's response pretty much says it all :).  You can't add custom fields to Documents.

 

Actually, have you considered using Content instead?  Content documents have categories (in the form of workspaces) and tags, plus they're indexed for search and generate previews.  In general they're much more useful.

This was selected as the best answer
Inertia1024Inertia1024

Interesting!  I hadn't noticed the Content object.  That sounds like a definite area to explore.

 

Do you know whether it's possible to grab a preview of a ContentVersion object using the API?

 

 

*werewolf**werewolf*

If by grab a preview you mean " get the flash app which shows the document in the Content window" then no, that's not API accessible afaik.

Inertia1024Inertia1024

Thanks for all the help!