In order to create new or customize existing Content Types, first navigate to [Setup]->[Customize]->[Salesforce CRM Content]->Content Types. You may either create new by clicking on the [New] button or customize existing by clicking [Edit] on the General Content Type. It's probably a best practice to create or utilize a base type from which all of your base Content Interfaces/Abstract types can be cloned; when you click [New] you are asked to choose what Content Type you would like to base off of and you are asked to name the new Content Type.
Once you have a Content Type you are comfortable with, you can add Custom Fields to the Content Object. By utilizing different types and choosing what fields are available respective to the Content Type, you can enable polymorphism for Content.
Make sure you have a custom object that you'd like to Lookup (or use a standard object) and add a lookup field to Content to that object. Like so:

Now that you've added this, you are able to contribute Content to our Public Workspace through the Workspace tab. Name the Content (the filename will be the default after you've chosen the file to upload), choose the workspace, pick from and/or add to the tags and (important) relate to an instance of your Custom Object.

Finally, you can go to your Custom Object and (assuming you've added the related list to your layout) view the Content from your Custom Object with one click.

Now, the most obvious opportunities for improvement are that you would be able to contribute directly to the workspace from a button on the Custom Object. The next post will take you through how to do that using Visualforce and Apex.
No comments:
Post a Comment