We can also enable SharePoint List versioning using c#
using (SPSite spsite = new SPSite("http://win7/"))
{
SPWeb spweb = spsite.OpenWeb();
SPList list = spweb.Lists["CustomList"];
list.EnableVersioning = true;
list.Update();
}
Retrieve SPListItem versions using c#
using (SPSite spsite = new SPSite("http://win7/"))
{
SPWeb...
Showing posts with label Server Object Model. Show all posts
Showing posts with label Server Object Model. Show all posts
Monday, June 12, 2017
Wednesday, July 13, 2016
We have to add sharepoint Namespace SPUtility
SPUtility.CreateISO8601DateTimeFromSystemDateTime(dateISO...
Wednesday, June 8, 2016
08
Jun
SPSite site = new SPSite("http://peakfinders");
SPWeb web = site.OpenWeb();
SPList custList = web.Lists["Employee"];
SPField vtid = custList.Fields["VoterID"];
vtid.Indexed = true;
vtid.EnforceUniqueValues = true;
custPhone.Update(...
08
Jun
Coding:
if (spProjectListItem["USER"] != null)
projectMemberValue = spProjectListItem["USER"].ToString();
SPFieldUserValueCollection oFieldUserValueCollection = new SPFieldUserValueCollection(spDLRWeb,
...
Wednesday, March 2, 2016
C# Coding:
DateTime strdate = (DateTime)DateTime.Today.AddDays(7);
string strgetDate = strdate.Year + "-" + strdate.Month + "-" + strdate.Date.Day;
SPWeb currentWeb = SPContext.Current.Web;
SPList lst = currentWeb.Lists["Projects"];
...
Labels:
C#,
CAML Query,
Server Object Model,
SPServices