6

The title says it all. I would like to add a field to the attachment object to be able to sort/filter based on the attachment's type (eg, 'Will', 'Account Opening Document', 'Correspondence', etc.).

Thanks!

2 Answers 2

8

There is no way to add a custom field to the Attachment object. However, there are two ways to do what you want.

1) Create a custom document object to store additional information about the attachment and attach the files to that object. You would have one attachment per document and if you wanted to write a small trigger you could even automatically add direct links to download the attachment onto the document.

2) Use Chatter files instead of attachments. Chatter files and Content have much more robust searching/tagging/filtering capabilities than attachments.

2

1) I am assuming you are trying to use this in some apex/query and 2) I am not too familiar with attachment object but from docs I see

1) This read-only object contains all notes and attachments associated with an object. http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_attachment.htm ContentType is a already existing field desc : The content type of the attachment. If the Disallow HTML documents and attachments security setting is enabled for your organization, you cannot upload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi.

Does this help ?

3
  • Thanks for the link. To your assumptions, I am not planning to use this with any apex or queries at this time, I would like to be able to display this information on the attachments related list, in addition to generating reports that filter based on a 'Type' field. I will explore the ContentType field and see if that helps. Thanks! Sep 24, 2012 at 20:11
  • any idea how I can view the attachment object? Thanks again Sep 24, 2012 at 20:12
  • Alas I dug up this a little bit looks like notes and attachments are very hardcoded. you cannot customize the related list view related to notes and attachemts. people are voting for the idea : all that we could do is promote the idea:( success.salesforce.com/ideaView?id=08730000000BrhNAAS
    – Rao
    Sep 24, 2012 at 20:25

You must log in to answer this question.

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