Thursday, December 26, 2013

Rest Solution in Share Point 2010

Fetch the record from sharepoint list using jQuery with ajax call..............


Lets take an example :-
List name :http://site/web/_vti_bin/ListData.svc/UserInformationList

from this list i want to fetch data of all users.
$.ajax({
        url: "http://mypc/BD/_vti_bin/ListData.svc/UserInformationList",
        dataType: "json",
        success: function(data) {

$.each( data.d.results, function( key, value ) {
  alert( key + ": " + value.Account );
});          
         
        },
        error: function(data) {
            alert("error");
           
        }          
    });