Archive

You are currently browsing the archives for the Best Practices category.

Jun

25

Admin and End User Naming Conventions

By Cory

SharePoint naming conventions, or any naming conventions for that matter, are great… but they are only good if they are followed and used consistently. This article is not designed to be a definitive list of what to do but more of a guide that will hopefully help you establish your own best practices within your organization. Read more »

May

16

Understanding SharePoint Features

By Cory

First… What Is a Feature?

A feature is a mechanism to deploy and activate customizations to a SharePoint environment. Features can be activated in the user interface empowering the administrator or end user with the ability to easily enable or disable a customization. Features are made of a manifest or feature.xml, one or many additional element XML files and additional resource files if applicable. Read more at MSDN. The most important benefit to features is that they can be deployed with Solution Packages (WSP), using solution packages will keep you in a supported, restorable state and encourages developers to focus on deployment and packaging during the initial phases of development which is extremely important. Read more »

Jul

21

Properly Populating and Retrieving SharePoint Field Data

By Cory

SharePoint uses a lot of field types that have different underlying schemas, delimiters and formats. I see a lot of people reverse engineer the field information and “hack” the data into the list using a string such as “1;#Title” for a lookup field. Well this isn’t exactly best practice so I’ve put together a reference table below to assist in using the correct data types for populating or retrieving information from a SharePoint list.
Read more »

Jan

8

Properly Checking Metadata in SharePoint Workflow

By Cory

Since you want your SharePoint workflow to be as fault tolerant as possible it is always a good idea to use the following method when you are accessing fields from an SPListItem. This is especially true if they are custom fields that are deployed via a Site Column or Content Type as your workflow will receive nasty errors such as “Null Reference Exception” and “Array Out of Bounds Exception” otherwise.

if (workflowProperties.Item.Fields.ContainsField("Custom Field") && workflowProperties.Item["Custom Field"] != null && workflowProperties.Item["Custom Field"].Equals("Some Value"))
{
// continue with rest of code
}