Using Vermeer Content Types and Impersonation to handle SharePoint Document Uploads

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

I had an interesting request from a client today. I am maintaining an existing project that has been in production for a few years now. This is one of those situations where I have a limited budget and time and also I cannot fundamentally change the overall process. These caveats aside, nothing out of the ordinary, but interesting nonetheless.

First a little background.

This project involves a simple approval workflow that controls routing and notifications for documents being placed into two document libraries. Furthermore, an out of the box SharePoint task list collects and manages workflow tasks.  When approved, an event receiver on the task list for the workflow routes documents to the “Approved” document library, otherwise, it routes them to the “Further Review” document library. Then, when a document is added to either library, a new workflow is automatically initiated– remember the caveats above. This workflow adds another task to the task list to be evaluated by the event receiver. This time, the event receiver on the task list sends an email to the original document submitter notifying them that they either need to review the document, and make changes, or it was successfully submitted.

Keep in mind this was working, until…. Read more of this post

Aliasing Fieldnames in SharePoint

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

Anyone who has done any configuration in SharePoint knows the frustration involved with attempting to determine the actual fieldname within a SharePoint list.  The following table shows how a column defined as a  Site Column at a top level site can be aliased at the Site Column, Site Content Type, Web Content Type and List levels.

Name/Alias Source Level1 Level2 Level3
Team Site Column - - -
Team Name Site Column Site Content Type - -
Fav Team Name Site Column Site Content Type Web Content Type
My Fav Team Name Site Column Site Content Type Web Content Type List

Regardless of what I aliased the field name along the way to present to users, if I want to reference this field in a Content Query Web Part or custom code such as an Event Receiver, I need to reference it by the name “Team”.

There are a lot of posts about how to hack the CQWP to get it to show you all of the underlying field names, or to use the URL of the edit field page to show you the internal name of a field, but both of these are cumbersome and tedious, especially if I have access to a physical Development or Test server.  With PowerShell, I can write a very simple script to spit this information out: Read more of this post

…Yeah but I do things other than SharePoint

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

Me too!  SharePoint is still a memory hog, which is why I don’t want the SharePoint services running on my developer workstation constantly when I’m trying to develop a WPF application, or write a proposal or … whatever.  There are a couple things we can do to reduce the overhead of SharePoint on my workstation so it does not suck up every last bit of available RAM.

  1. Throttle the RAM usage of SQL Server
  2. Isolate your Dev SQL Server instance from your SharePoint Instance
  3. Turn off Services in use by SharePoint

The easiest thing to do is to throttle your SQL Memory usage.

  1. open up SQL Server Management Studio (SSMS)
  2. connect to your instance
  3. View the properties of your instance
  4. choose the “memory” page
  5. adjust accordingly: Read more of this post

SharePoint 2010 Developer Workstation with Windows 7

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

There are several blogs about this topic also, but I thought I could add my $0.02 here after hitting a couple of stumbling blocks this afternoon.  I will be referencing the steps outlined here: Setting Up the Development Environment for SharePoint Server.

Step 1: Choose and Pre-configure the Operating System

I know, I know, it’s redundant, but it is still the truth and there is no way to fake it.  Your OS must be x64 and no N/KN builds.  Also, to avoid digging through massive maddening log files later, make sure that you have at least SQL Server 2008 version 10.00.2437.00.  Anything earlier than this build won’t work.  BTW…with SQL Server 2008 R2, you are automatically there.

Step 2: Install the Prerequisites for SharePoint 2010

This MSDN article explains how you can use the extract command to get this to work.  Alternatively, you can run the .exe here and it will automatically extract all of the files to c:\Program Files (x86)\MSECache\oserver2010.  This is important because one of the prerequisites (Microsoft FilterPack 2.0) must be installed from the extracted package.  I tried using a utility to perform the extraction (WinRAR); save yourself the headache as it will extract the files, but won’t respect the internal folder structure of the compressed file.  The full list of prerequisites, in order, are listed here: Read more of this post

The Power of PowerShell

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

With the new SharePoint PowerShell extensions that come with SharePoint 2010, we can do some pretty powerful stuff that was a little bit awkward with earlier versions of SharePoint.  In the past, I may have written a one-off console applications to iterate over sites looking for content, modifying that content and disposing of those objects.  That means, that I now have a full-blown executable that I need to put on the production server polluting what should be a pristine environment.  I could have also lazy-loaded the SharePoint assemblies with PowerShell and written the same scripts, which would not be very secure and possible cause memory leaks if I do not dispose of my variables correctly.  Now, I have native PowerShell commandlets to provide this functionality.  Here are a couple examples:

  1. I have a slew of webs which are all built off of the same site definition and all contain a list of events with the name “Case Schedule”.  I need a one-off mechanism to build a report showing the details of all events for a particular date range. Read more of this post

Silverlight’s Grid Control

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

With the direct integration of SharePoint with Silverlight, Silverlight now becomes an extremely flexible and viable tool for enhancing SharePoint’s default user interface.  With my current project, I have especially found that the Grid control with Silverlight 3.0 presents significantly better than SharePoint’s SPGridView control, which is how we used to have to display custom data to look like a SharePoint list.  As with any new technology, however, there are some pitfalls which I can hopefully shed some light on.

1. Grouping
Ever since SharePoint 2007 first came on the scene with its native ability to configure grouped tables within a grid control everyone has been trying to add this functionality to customized data, whether that was using third party controls or trying to retro-fit SharePoint’s SPGridView.  With Silverlight 3, this becomes trivial.  There are two classes which are necessary to implement this functionality.  1) PropertyGroupDescription 2) PagedCollectionView.  The PagedCollectionView object is instantiated with an IEnumerable source.  Once instantiated, one or more PropertyGroupDescription objects can be added to the collection of PagedCollectionView.GroupDescriptions.  The PropertyGroupDescription is instantiated with a string for the field name on which to build groups.  Therefore, if your underlying object has a property called DueDate, by instantiating your PropertyGroupDescription with the parameter “DueDate”, your grid will automatically group by that field.  Here is an example for those who don’t like to read: Read more of this post

SharePoint 2010 Search

Slalom Consultant Marc Schuricht

Slalom Consultant Marc Schuricht is a Denver based software Solution Architect with over 12 years of professional experience in IT projects ranging from configuration and change management to custom enterprise application development.

This has been posted on the web more than once, but I always have a hard time finding it…My client wants to restrict the search capabilities of SharePoint 2010 to only include subwebs, excluding lists, libraries, items, pages, etc.  This is a pretty easy thing to accomplish, but as with a lot of things in SharePoint, a little bit obscure.  What I need to do is add scope rules to exclude sets of “contentclass” items:

SharePoint search - scope rules to exclude sets of “contentclass” items:

Click to see full size: scope rules to exclude sets of “contentclass” items

the list of relevant contentclass-es are: Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 129 other followers

%d bloggers like this: