How to Batch Update List Items in SharePoint 2013 based on a CAML query (using Web Services + AJAX + JQuery)

Example of Batch Updating List Items in SharePoint 2013 based on a query using Client Object Model and Jquery.

In this example we will look at a Script where we make an Ajax call to GetlistItems web service and pass a CAML query to retrieve all Items with "Project Cost" greater than $1000 (as seen in the Before Projects list screen below). Once the Items are Retrieved (based on a "Project Cost" CAML query), we Create a Update Batch of these Items and pass it to the UpdateItems method.The UpdateItems method finally updates the required Items in the Projects List with the appropriate Status (see the After Image below).

Final Result – After running the Batch update script, all the Items with "Project Cost" > $1000 will have an updated Status of "Transferred" in the Custom Project List that we have Created.

Before :


After :


To begin,

1. Download the Script  and add it to Script Editor or Content Editor WebPart on your Lists Page. 2. Edit the listname, Column names and Value for the CAML query and update batch (in AddTobatch() method). 3. Once done Save and Click the link "Update Status for Items with Project Cost >$1000″ to update the Items that are retrieved from the CAML query. 4. Once updated a Confirmation message – "Update Complete" is displayed.


Folders and unsupported file types can’t be uploaded in SharePoint 2013

This is a quick tip about adding Folders or Items to a document Library using the new Drag and Drop feature.

If you are trying to Drag-n-Drop folders into a documnet library, you might run into the following error -

"Folders and Unsupported file types can't be uploaded"


The error simply occurs because with the new Drag and Drop feature you cannot add or Upload Folders,Items and Document sets into the library.This is a major limitation for Companies who love to add folders instead of individual Files in the library.

If this what your requirement is, there are few alternatives available for you.

1. Use the conventional Windows Explorer View - To Open Windows Explorer click on Upload Document button as shown in picture below


Next in the Add Documents popup click on "Upload Files using windows Explorer Instead" to Open the Windows explorer view where you can Drag and Drop folders.


2. Map the Document Library as Network Drive – You can Map any document library as a network drive and then drag and drop folders to it.


When you Map a document Library as a Network drive, you might see an error because of the missing "Desktop Experience" feature in Windows Server 2012. Take a look at this post where we resolve this issue and Map Master Page gallery as a Network drive.


3. Using SYNC Option - In SharePoint 2013, you can make any Document Library SYNC to your Local Folder (Including the SkyDrive PRO Library) to work with documents Offline. Once the Library is SYNCed users can Open, Edit and Add Files and Folders to the SYNCed Library Folder that gets created on your Local. These additions can be Synced back to the Library either everytime when you connect to SharePoint or On-Demand with "Sync now". Take a Look at the steps at Work with Documents Offline in SharePoint 2013