SharePoint 2010 Resources

SharePoint 2010 Developer Training Course SharePoint 2010 provides the business collaboration platform for developers to rapidly build solutions using familiar tools while leveraging a rich set of out of the box features. Visual Studio 2010 and SharePoint Designer 2010 make developers more productive and Visual Studio Team Foundation Server delivers support for application lifecycle management….


Automatically restart the failed workflow instances

Recently I came across a situation in which customer had email enabled a document library and he had setup a custom workflow to start whenever any new item is added in the library. This setup was working as expected but when end-users send some higher number of emails at the same time (lets say 20-30…


Code snippet to create a Tasks list and associate it with a Parallel Approval workflow in a Pages library

The requirement to write this code was, After export/import, workflow modification for approvers was failing. Approvers were not able to perform the Approval workflow operations and then we tested that if we create a new Tasks list and modify the existing Approval workflow association then everything starts working so we needed a code which can…


Code Snippet to remove duplicate workflow associations from a content type

1: using (SPSite site = new SPSite("http://ms9:105")) 2: { 3: using (SPWeb web = site.OpenWeb()) 4: { 5: SPList list = web.Lists["Shared Documents"]; 6: 7: foreach(SPContentType con in list.ContentTypes) 8: { 9: if (con.Name == "Document") 10: { 11: SPWorkflowAssociationCollection assocCol = con.WorkflowAssociations; 12: bool App = false; 13: bool Feed = false; 14: bool…


How To: Access item metadata from workflow when associated in document library

Problem There is a workflow which accesses the item metadata on workflow activated. In case of document library, when you upload a document, if the workflow is set to start on ItemAdded, it will start just after upload is done and before you completely fill up the metadata information of the item. Since it is…


Resolution: Workflow is not loading the newer version of definition file.

Some times visual studio loads the older version of the workflow definition while debugging, even though you might have deleted an activity from the workflow, when you debug the code the definition file shows the older version where we the old activity will be still present. Resolution Visual studio loads the workflow definition from the…


Resolution: SendEmailNotification=true does not send an email

SendEmailNotification=true does not send an email, it was not sending email on time. Cause There are two different methods on which SendEmailNotification=true and SendEmailActivity work. Details 1.    I noticed that I was able to get the email from SendEmailActivity but where SendEmailNotification=true was there in code that email I was getting after every five minutes….


How To: Get workflow description which is more than 255 characters

Question1: Is it possible to get the information from the description field of workflow history list only for the running instance of the workflow? also if the description value is more than 255 characters, it truncates the value so how to get the complete value? Question2: SharePoint history is supposed to be purged every 60…


How To: A custom workflow(Approval) to send the notification emails with custom message appended at the end

task.createWssTask_TaskProperties1.EmailBody = @"<!DOCTYPE html PUBLIC ‘-//W3C//DTD XHTML 1.0 Transitional//EN’ ‘’> <html xmlns=’’ xmlns:m=’’ xmlns:v=’urn:schemas-microsoft-com:vml’ xmlns:o=’urn:schemas-microsoft-com:office:office’> <head> <meta http-equiv=’Content-Type’ content=’text/html; charset=utf-8′ /> <title>Untitled 1</title> <style type=’text/css’> table.MsoNormalTable     {font-size:10.0pt;     font-family:’Times New Roman’,’serif’; } p.MsoNormal     {margin-bottom:.0001pt;     font-size:12.0pt;     font-family:’Times New Roman’,’serif’;         margin-left: 0in;     margin-right: 0in;     margin-top: 0in; } a:link     {color:#003399;…


Resolution: MOSS: Cannot execute multiple tasks in workflow

Behavior/Symptoms: MOSS: Cannot execute multiple tasks in workflow when user tried to modify the second task, the page will be freeze for 2 min and after that nothing it will modify, status will be same. second time when user tries to modify, he gets an error. Error Message: "This task is currently locked by a…