A Word about SharePoint Content Types

When Editing Content types, make sure you are not editing the core content types for your site collection. Editing “Item”, “Document” or “Event” in particular by adding or removing columns and pushing the changes to all content types that depend on these will potentially ruin the functionality of your site. These content types should be locked in a bin, wrapped in chains, put inside a steamer trunk, placed inside a large concrete block and dropped into the Mariana Trench where no-one in your organization will be able to access and modify them.

I mention this as I have just had a small aneurysm after watching 2 weeks of work get blown away because someone modified the “Item” Content type, which ruined the list dependencies I had associated with my InfoPath Form, right as a client was looking at the site.

SharePoint Calendar Colors with JavaScript

Yes, there is a “codeless” way to do this using views and calendars, but you may want to use the JavaScript method to get more than just the standard colors that ship with SharePoint 2010.

How to add color coded categories to your calendars with JavaScript:

Caveats:

This solution uses Calculated Fields to display colors related to a particular category. The Category column MUST be a choice column – a lookup column will not work as look-up columns are NOT allowed in Calculated Field Column equations.

You must be able to add a Content Editor Web Part to the pages where the calendar will be viewed.

Part 1: Setting up the JavaScript:

  1. Copy the following script into a text file: