Hi,
I have created webmehtod using C# which returns no of records like (100) using list
like this
[WebMethod]
public static List<clsDossier> GetCompanyCredenReport(int companyID, int countryID, int licenseID, string fromdate,string todate, int userID)
{
clsDossier oDossier = new clsDossier();
List<clsDossier> lstdossier = new List<clsDossier>();
// dossierID used on renewal state
lstdossier = oDossier.GetCompanyCrdedentialReport(companyID, countryID, licenseID, fromdate, todate, userID);
return lstdossier;
}
using this list, data is parsed into table using json
Problem:
I successfully fetch all record which is around 100 but list does not return anything to json where I populate data into table , I mean this webmethod doesnot return list to json where I called it (ajax called)
if I fetch only 42 record using CAML setting row limit so it returns records to json and data gets populated successfully, and as I remove "row limit" to fetch all record so it does not return (where Its called) .
like this
function getreports() {
var obj = {};
obj.datetype = $('#rdregisterdate').is(':checked') ? 1 : $('#rdexpirydate').is(':checked') ? 2 : 3;
obj.userID = GetUrlKeyValue('ud');
$.ajax({
type: "POST",
url: "/_layouts/15/abc/test.aspx/GetMangementReport",
data: JSON.stringify(obj),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccesretrive,
failure: function (response) {
alert('Not Try again after refreshing page');
}
});
// if I call 42 record so below method gets executed else not
function OnSuccesretrive(response) {
if (response.d.length > 0) {
}
}
observed:
if I set row limit using " CAML osPQuery.RowLimit = 40 ", so it returns record to Jason else not,
Required Solution
Kindly suggest me what to do to show all fetching records without setting Row limit