Use $Top in AJAX query to return more than 100 items

By default ajax queries return 100 items as the maximum. By using $Top in the query URL more than 100 items can be returned.

REPLACE

 var call = $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + “/_api/Web/Lists/GetByTitle(‘”+params.childList+ “‘)/items?$select=Id,”+params.childLookupField+”,”+params.parentFieldInChildList+ “/Id&$expand=”+params.parentFieldInChildList+”/Id&$filter=”+params.parentFieldInChildList+ “/Id eq “+ parentID+”&$orderby=” + params.childLookupField, type: “GET”, dataType: “json”, headers: { Accept: “application/json;odata=verbose” }

WITH var call = $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + “/_api/Web/Lists/GetByTitle(‘”+params.childList+ “‘)/items?$top=200&$select=Id,”+params.childLookupField+”,”+params.parentFieldInChildList+ “/Id&$expand=”+params.parentFieldInChildList+”/Id&$filter=”+params.parentFieldInChildList+ “/Id eq “+ parentID+”&$orderby=” + params.childLookupField, type: “GET”, dataType: “json”, headers: { Accept: “application/json;odata=verbose” }