New answers tagged

0

This is what I ended up doing: itemCount = 0; runCount = 0; arrLists = ["Migrated 2011", "Migrated 2012", "Migrated 2013", "Migrated 2014", "Migrated 2015 A - F", "Migrated 2015 G - P"]; arrYears = [2011, 2012, 2013, 2014, 2015, 2015]; ExecuteOrDelayUntilScriptLoaded(Initialize, "sp.js"); function Initialize() { ctx = new ...


0

Syntax and a working solution Works in SP 2013. Geq><FieldRef Name="EventDate"/><Value Type="DateTime"><Today OffsetDays="-30"/></Value></


2

Author is the person who created the item. It is assigned once the item is created and never changed. Editor is changed every time item is modified. Better use SPFieldUserValue to retrieve SPUser. foreach (SPListItem item in myItemCol) { SPFieldUserValue usrAuthor = new SPFieldUserValue(SPContext.Current.Web, item["Author"].ToString()); author = ...


0

I think this occurs due to missing Type attribute in List Item entry. If you want to create list items using REST you will need to include the list item type. The list item type is a string automatically created by SharePoint when the list is first created. You can generate this value using the list name. The syntax is : SP.Data.{ListName}ListItem. So ...


0

Simpler CAML - items created by current user query.Query = @"<Where> <Eq> <FieldRef Name='Author' /> <Value Type='User'><UserID/></Value> </Eq> </Where>";


2

The CAML would look like: <Where> <Eq> <FieldRef Name='booleanField' /> <Value Type='Boolean'>0</Value> </Eq> </Where> If you are going to be building a lot of CAML queries, I'd highly recommend picking up the CAML Designer from http://www.biwug.be/resources.


2

Document sets are just "fanzy" folders, so you have to use scope RecursiveAll. query.ViewXml = "<View Scope=\"RecursiveAll\" /> "; Or simply use the CreateAllItemsQuery that sets the same caml markup: CamlQuery query = CamlQuery.CreateAllItemsQuery();



Top 50 recent answers are included