Parlae Solutions Blog

Waive Emails for SharePoint 2013 Workflows in Visual Studio 2013 Designer


Our shop is full of coders—not power users, not designers but coders. We write lines, compiled or interpreted, and develop out from there. As such, any success we achieved with workflows in SharePoint 2010 represented a hard-earned, time-intensive victory. Even as most of us became conversant with their bugs and quirks, we still identified our in-house “workflow guy”—he had the lucky (re: patient) touch required by tetchy 2010 workflows.

Having admitted as much—acknowledging the requisite pain and time-sink that became synonymous with workflows—we were not thrilled to learn that Microsoft had all but deprecated custom code in SharePoint 2013 Workflows. It is possible to develop and deploy custom code, but Microsoft does not ease the process and strongly discourages its use. For better or worse, SharePoint 2013 workflows are (largely) declarative.

Of course in a house of coders, the prospect of “developing” through SharePoint Designer remains anathema. It may be a hardliner stance, but as our expertise revolves around code-based IDEs, we routinely avoid Designer whenever possible. With workflows newfound reliance on declarative actions and preexisting service calls, using the workflow designer in Visual Studio 2013 became a business necessity rather than an inconvenience.

Our very first 2013 Workflow presented our very first bug. Our client had a simple but lengthy approval process for a business process. After initial QA, the client decided that users ought not receive the automatic emails from assigned tasks. It is far from an outlandish change request, especially since we had already developed custom forms for modifying task items—users could manually identify if and when they wanted to send notifications.

At first glance, it is a simple matter of setting a couple of activity properties for SingleTask (or CompositeTask). Microsoft documents the properties, WaiveAssignmentEmail and WaiveCancelationEmail. Countless blog posts and forums describe the process in SharePoint Designer—apparently a couple of checkboxes. (Don’t know, refuse to look—perhaps someday after we can freely transfer back and forth between Visual Studio and SharePoint Designer.) Said same blogs and forums suggest that surely these checkboxes exist in Visual Studio’s workflow designer.


Blog ImageBlog Image


Blog ImageBlog Image

As you can see, neither the designer nor the properties window list the properties to waive emails. They both enable you to disable reminder emails or to customize the assignment and cancellation emails—waiving them entirely is not presented.

Further posts and replies suggest that this oversight was a bug addressed in various patches or updates. After fully updating and patching several different installations of Visual Studio, the properties remain missing.

After all that early talk of our house of coders for coding, we decided to modify the XAML directly. This is fairly commonplace and well within our comfort zone. So we switch to code view (press key F7), identify our task elements then add the properties:

Blog ImageBlog Image

IntelliSense does not mark the properties as invalid. However when we switch back to designer view (press keys Shift+F7):

Blog Image

The properties cause the designer to fail. Luckily, the workaround for this issue is stupidly simple yet stunningly obtuse. We would hate to admit how long it took us to discover it:

  1. Add following reference to project: Microsoft.SharePoint.DesignTime.Activities.16.0
  2. Do not attempt to build or deploy in designer view.

The reference is the same as the existing one, apart from the 16.0—no indication how it behaves differently. If you remain in code view, you can add the requisite properties, build, and deploy without error. The build still errors if you switch back to design view, but if the workflow remains in code view, it builds and deploys cleanly.

Please share if you thought this post was worth reading!


Schedule a Free Consultation

Thank you for your interest in Parlae Solutions. One of our team members will be happy to assist you. If you prefer to be contacted by phone, please provide a phone number and the best time to reach you in your message. If you need immediate assistance, please call (216) 526-2737.