What’s new for Office 365 and SharePoint 2016 – A summary from the Microsoft Ignite Conference

Last week I was one of the 23,000 people who attended the Microsoft Ignite conference in Chicago. The size of this conference was mind boggling and the amount of content was staggering. My focus was to learn as much as I could about Office 365 and SharePoint 2016. Here is my attempt to summarize the key things that I learned. Keep in mind that there were over 1000 sessions in total and I only attended a dozen or so. Continue reading

Working with List View Thresholds in SharePoint 2013

Thresholds were introduced by Microsoft in SharePoint 2010 in order to prevent large queries from occurring which have an impact on performance of the SharePoint environment. I’ll explain why thresholds were introduced, what happens when thresholds are reached, and provide some tips to fine tune your queries to avoid performance and scalability issues.
Continue reading

A review of Office 365 and SharePoint announcements in 2014

It has been a busy year for Microsoft and I thought it would be interesting to take a look back at 2014 and review some of the big SharePoint and Office 365 announcements. I decided to list these by the approximate month they were announced rather than when they were released, since the roll out of new features are often staggered over time.  My original list was enormous, so I cut it back to only include the announcements I thought were the most interesting. Continue reading

Quickly search your SharePoint content from Google Chrome

This is an old trick I’ve been using lately so I thought I would share. If you are a Google Chrome user and happen to also use SharePoint in your organization, you can easily search your SharePoint environment from the Chrome address bar. This is a great shortcut to quickly finding content within your SharePoint environment.

To set this up, you will first need to do a normal search in your SharePoint environment.

  1. Execute a search in SharePoint using a simple keyword, e.g. “workflow”. You should be taken to your search results page. Now look at the URL of your page. It should look something like this http://yourcompany.com/something/Results.aspx?k=workflow.
  2. Now copy that URL to your clipboard.
  3. Right-click directly in the address bar in Chrome and select Edit Search Engines.
  4. At the bottom of the window, add a new entry. Give it a name that makes sense. It my example I use the term “SharePoint” with the keyword “sp”. Paste the URL you copied earlier into the URL box. Replace your keyword (e.g. workflow) with %s.

Save everything and you should be good to go. Now go to your Chrome address bar and type in your keyword (e.g. “sp”) and hit “Enter”.

The address bar should change to show you are searching SharePoint. Enter any search keywords and your SharePoint search page should load with your results!

Starting a SharePoint 2013 workflow programmatically using C#

The following code snippet shows how to create a SharePoint 2013 workflow using C#. While the code itself is pretty self explanatory, here are some hints:

  • SharePoint 2013 workflows are substantially different than previous SharePoint 2010 workflows. You can read about the SharePoint 2013 architecture here. Therefore, the code to start them is different as well. 
  • When starting the workflow, you must tap into the workflow subscription service, find the workflow you want to start and start it.
  • The sample code assumes you already have a workflow associated with the list.
  • The sample code does not contain any error handling. 
  • The sample code shows how to add input parameters. If your workflow has an initiation form that passes values into the workflow, you can create those values here.
/// <summary>
/// Starts the SharePoint 2013 workflow.
/// </summary>
/// <param name="item">The list item that we want to start the workflow against.</param>
/// <param name="workflowName">The name of the workflow that is associated with the list.</param>
private static void Start2013Workflow(SPListItem item, string workflowName)
{
    var workflowServiceManager = new WorkflowServicesManager(item.Web);
    var workflowSubscriptionService = workflowServiceManager.GetWorkflowSubscriptionService();

    // Get all workflows associated with the list
    var subscriptions = workflowSubscriptionService.EnumerateSubscriptionsByList(item.ParentList.ID);

    // Run all workflows associated with the list
    foreach (var workflowSubscription in subscriptions)
    {
        if (workflowSubscription.Name.Equals(workflowName))
        {
            // Pass in any initiation parameters
            var inputParameters = new Dictionary<string, object>();
            //inputParameters.Add("MyProperty", "MyValue");
            
            workflowServiceManager.GetWorkflowInstanceService().StartWorkflowOnListItem(workflowSubscription, item.ID, inputParameters);
        }
    }
}