-
Recent Posts
Recent Comments
Archives
- August 2019
- May 2019
- April 2019
- November 2018
- October 2018
- September 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- August 2017
- July 2017
- May 2017
- March 2017
- February 2017
- November 2016
- October 2016
- January 2016
- December 2015
- November 2015
- September 2015
- August 2015
- June 2015
- May 2015
- April 2015
- February 2015
- January 2015
- September 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- December 2012
- November 2012
- September 2012
Categories
Meta
Tag Archives: c#
Complete SharePoint tasks via Email using Exchange Web Services (Microsoft Exchange Web Services Managed API 2.0)
Sometimes it is a pain that you want to complete a SharePoint task but you are not on your company’s network or connected via VPN. This blog shows you how you can send an email to a mailbox to complete … Continue reading
Posted in EWS, SharePoint 2010, SharePoint Designer 2010, Visual Studio 2010, Web Service
Tagged c#, ews, SharePoint Designer 2010
Leave a comment
SharePoint Event Receiver Does Not Fire
1. Add Trace Log to see if it is really not firing: string now = DateTime.Now.ToString(“ddMMyyyy-HHmmss”); // Creates the text file that the trace listener will write to. System.IO.FileStream myTraceLog = new System.IO.FileStream(“C:\\temp\\SharePoint Trace Log\\” + now + “.txt”, System.IO.FileMode.OpenOrCreate); … Continue reading
Posted in Event Receiver, SharePoint 2010, Visual Studio 2010
Tagged c#, Event Receiver, sharepoint
Leave a comment
Programmatically complete a workflow task
To complete a workflow task programmatically, use the following code (say taskItem is the task you want to complete): taskItem.Web.AllowUnsafeUpdates = true; Hashtable data = new Hashtable(); data[SPBuiltInFieldId.Completed] = “TRUE”; data[SPBuiltInFieldId.PercentComplete] = 1; data[SPBuiltInFieldId.Outcome] = “Completed”; data[SPBuiltInFieldId.TaskStatus] = SPResource.GetString(new CultureInfo((int)taskItem.Web.Language, … Continue reading
“An entry with the same key already exists” Error
Check if there are duplicated values in a drop down list If you are trying to set more than one option in a drop down list as selected, i.e., item.Selected = true; , you will get this error.