Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

cusotm web method not returning records more than 40

$
0
0

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');
                }
            });
        return false;
    }

// 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






Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>