Hot answers tagged

2

SP.CamlQuery does not have a property RowLimit , you have to set in the caml markup: camlQuery.set_viewXml("<View><Query> <OrderBy> <FieldRef Name='ID' Ascending='False' /> </OrderBy> </Query> <RowLimit>5</RowLimit> </View>");


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();


1

Your query is wrong. Try below query instead camlQuery.set_viewXml("<View> <Query> <OrderBy> <FieldRef Name='Mise à jour parc'> </FieldRef> </OrderBy> </Query> </View> ");


1

Like Amal Hashin said, you've opened a <FieldRef>, but you should close it like that : <FieldRef Name='Mise à jour parc' /> <Value Type='Text'>Non</Value> Also I saw a mistake in your code. You use collListItemToBeUpdatedReventeas variable to print the result of the query. The problem is that you use that variable several times in ...


1

Try this if it works for you. You can avoid first five items using below mentioned listitems.getEnumerator() code. function getItemsToBeUpdated() //this function called on button click to get ID's { var clientContext = new SP.ClientContext.get_current(); var oList = ...


1

Normally you have a callback on success and you it may have to work on all items: in that case you need to concat all results before executing the callback. Also you may need a check on complete callback. function GetAllItems (ListGuid, Query, OnSuccess, OnComplete) { function GetItems() { jQuery.ajax({ url: url, method: ...


1

Here is a console application that does what you want. Below i am getting the file by server relative URL, you could either get them directly by iterating the collection of items from the list. string pass = "<your-password>"; SecureString ss = new SecureString(); foreach (char c in pass) { ss.AppendChar(c); } using (ClientContext ClientWebContext ...


1

using (ClientContext context = new ClientContext("http://SharepointURL/")) { try { Web web = context.Web; FileCreationInformation newFile = new FileCreationInformation(); newFile.Content = System.IO.File.ReadAllBytes(@"C:\test.txt"); newFile.Url = "test.txt"; List docs = web.Lists.GetByTitle("CustomList"); ...



Only top voted, non community-wiki answers of a minimum length are eligible