Using Event Receivers for SharePoint Workflows

One of the more interesting challenges contractors for public sector clients have is working with older versions of software. On a recent project involving an integration of a solution I’d written using Microsoft Dynamics CRM 2016 and SharePoint 2010, I found myself struggling with an issue around capturing a digital signature.  

leverage SharePoint's out-of-the-box OOTB workflow for collecting signatures in SharePoint WorkFlowEventReceiver blog post by Joe DavisAs a straight SharePoint development project, this can be fairly routine: leverage Microsoft Word and its implementation of signature blocks, similarly leverage SharePoint’s out-of-the-box (OOTB) workflow for collecting signatures, and you’re basically done.

However, the client in question was less than enthusiastic about SharePoint as a platform in general and, because of that, and a few other design criteria, the bulk of the solution wound up being built in Dynamics CRM and SharePoint was largely a simple document repository.  

So, how do you not re-invent the wheel for digital signatures and still keep most of your smarts on the Dynamics CRM side? [Bear in mind the production environment where this was going to be enabled was very locked down. Farm solutions were prohibited, so even if you wanted to write your own custom workflow using .NET workflow, you couldn’t because that requires a farm solution.]

We have the OOTB workflow already and we can associate it with the document library in question, but what we really needed was the ability to notify CRM when that workflow completed. Answer: SPWorkflowEventReceiver.

Continue reading “Using Event Receivers for SharePoint Workflows”