Newsletter Digest in SharePoint Online

One of the new features rolled out recently to SharePoint Online is the ability to create a newsletter digest. It’s possible this has not rolled out to all tenants yet. If you do not see the option, you may get it before long.

How to use the newsletter digest

Add your News web part to a modern page. If you have a few news items added you should see a “See All” link.

 Modern News Web Part
Modern News Web Part

On the All News page you should see a list of all of your news items. In the toolbar there will be a “Manage Posts” button and an “Email a news digest” button. Obviously, click on the Email a news digest button.

 Modern All News Page
Modern All News Page

After clicking the “Email a news digest” button, you’ll be able to select the news items you want to send and then click “Next”.

 SharePoint Online Newsletter Digest
SharePoint Online Newsletter Digest

Next, you are given an option to name your news digest, enter the recipients, and any additional text you want to include. Click the Send News Digest

 Name your news digest
Name your news digest

The recipients you entered will receive a nicely formatted email with a digest of all of the news you selected.

 SharePoint Online Newsletter Digest Email
SharePoint Online Newsletter Digest Email

Of course, this is a very manual process. Somebody would need to routinely select and send out the news items they want to share. There could also potentially be some limitations that wouldn’t be obvious initially. Some of the questions I have are: How many recipients can be included? How many news items can be selected?

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 Working with List View Thresholds in SharePoint 2013

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 A review of Office 365 and SharePoint announcements in 2014

Starting a SharePoint 2013 workflow programmatically using the JavaScript Client Object Model

The following code snippet shows how to start a SharePoint 2013 workflow using JavaScript. Continue reading Starting a SharePoint 2013 workflow programmatically using the JavaScript Client Object Model

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);
        }
    }
}