in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

A quick look at the SharePoint 2010 Content Organizer

I can’t tell you how many SharePoint ECM projects I have seen where there has been a requirement to upload a document somewhere and then move it somewhere else based upon metadata or other criteria.  People have written a good amount of code in the past to make this happen.  Now with the SharePoint 2010 Content  Organizer, the need to write a lot of this code will be gone. Simply put it allows us to create rules that examine the content type and site columns of a document that was uploaded and move it some place else.  Surprisingly, I really haven’t heard very many people talking about this.  This post will show you how to get started with the Content Organizer using the UI and then my next post will show you how to deploy content organizer rules via CAML.  After all, I feel that it is my obligation to always show you how to create things that can easily be moved to your production environment later.

The first place to start is by activating the Content Organizer Site Feature.

ContentOrganizerFeature

Once you activate this feature, a document library called DropOffLibrary is created along with a list called RoutingRules.  You will also find two new links in Site Settings: Content Organizer Settings and Content Organizer Rules.

ContentOrganizerSiteAdministrationLinks

The settings link allows you to configure various things about the content organizer such as forcing all libraries on the site to redirect to the drop-off-library, and allowing you to target rules with destinations on other sites.  You can also enable folder partitioning to automatically create subfolders when one container gets too large (user specified limits).

The rules link takes you to the list where you specify the rules.  It’s pretty simple really.  All rules are based off a content type and then you can specify zero or more conditions based upon site columns on that content type.  You can use the priority option to give one rule more importance over another.  In this case here, I am creating a rule for the Image content type.

ContentOrganizerNewRule1

Scrolling down, I can set the condition based upon specific site columns in the content type.  In this case, I want to move any image that has a copyright date from last year or earlier into an asset library called Old Assets

ContentOrganizerNewRule2

It also has the ability to automatically create subfolders based upon metadata.  This is pretty cool.  For example I could have it create subfolders for each copyright year.  Unfortunately, in Beta 2 this interface has some issues.  The dropdownlist never allows me to select a property.  Also, selecting certain content types causes it to crash.  I also can’t edit an existing rule either.  I’m sure all of that has been fixed by now, but it’s something to be aware of if you are trying this out.

Now we need to try it out, I go to the Drop Off Library and use the Add new document link.  This library looks a little bit different on a few of the screens.

ContentOrganizerUploadDocument

The user gets a warning that his or her document will be moved.  When you add a rule to the organizer that involves a content type, it automatically adds it to the Drop Off Library. 

ContentOrganizerEditDocumentProperties

Once we submit, we get a notification of where the document got moved to.  Notice that it put it in the Old Assets document library.  If there was an issue moving the document or no rules matched, it will leave the document in the Drop Off Library informing the user that it could move in the future.

ContentOrganizerUploadComplete

The only thing I wish it did here was provide a link to the folder of the document as opposed to the document itself.

I really like the content organizer because it allows the user to just upload a document without having to think about where it should go.  This makes it much easier for user’s to get their job done and it helps you keep things organized.  As someone who does mostly ECM work, this is going to save me a lot of time in the future.  Pair this with the new Document Id service and we’ve got a very nice way of dealing with documents.  As I mentioned above, I’ll post on how you can import a set of rules using CAML.  It’s actually pretty simple.

Comments

 

Jigar said:

There is a problem with content organizer. I have 2 rules - 1 for image conent type and other for video content type. Now say I upload a video file but I do not change Content Type drop down value then by default it will apply rule for Image Content Type. I mean it is not able to identify what is the content type of file based on extension. Is there any solution to this problem

July 8, 2011 5:41 AM
 

CoreyRoth said:

@Jigar I don't think so.  If you pick the content type after you upload the file it should work.  Otherwise, you may consider writing an event receiver.

July 8, 2011 4:18 PM
 

CoreyRoth said:

@Jigar I don't think so.  If you pick the content type after you upload the file it should work.  Otherwise, you may consider writing an event receiver.

July 8, 2011 4:18 PM
 

neilp said:

Hi,

Can you let us know how you use CAML to create content organizer rules?

Thanks!

September 7, 2011 9:03 PM
 

CoreyRoth said:

@Nelip I ran into a snag when it comes to deploying the rules successfully with CAML.  I need to look at it again and see if I can get past the original issue.

September 9, 2011 9:59 AM
 

SharePoint 2010 Content Organizer « SharePoint Bee said:

Pingback from  SharePoint 2010 Content Organizer « SharePoint Bee

November 20, 2012 5:01 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2015 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems