public static function queryWithOrderBy($object, $queryData, $orderByField = null, $ascending = true, $limit = 1000, $page = 0, $returnFields = false, Infusionsoft_App $app = null)
 {
     $results = array();
     $Settings = ClassRegistry::init("Settings.Setting");
     $savedSearchId = $Settings->getValue(get_class($object) . '.SavedSearchId');
     if ($savedSearchId <= 0) {
         throw new Exception("Saved Search Id For Object: " . get_class($object) . ' not set in settings, please set the setting: ' . get_class($object) . '.SavedSearchId' . ' to the saved search id');
     }
     $userId = $Settings->getValue('SavedSearchUserId');
     if ($userId <= 0) {
         throw new Exception("Saved Search UserId not set, please set the setting: " . 'SavedSearchUserId' . ' to a valid Infusionsoft UserId.');
     }
     $rows = Infusionsoft_SearchService::getSavedSearchResultsAllFields($savedSearchId, $userId, $page);
     $className = get_class($object);
     foreach ($rows as $row) {
         /**
          * @var Infusionsoft_Generated_Base $dataObject
          */
         if (isset($row['Follow-UpSequence'])) {
             $row['FollowUpSequence'] = $row['Follow-UpSequence'];
         }
         $dataObject = new $className();
         $dataObject->loadFromArray($row, true);
         $results[] = $dataObject;
     }
     return $results;
 }
<form>
    savedSearchId: <input type="text" name="savedSearchId" value="<?php 
if (isset($_REQUEST['savedSearchId'])) {
    echo htmlentities($_REQUEST['savedSearchId']);
}
?>
"><br/>
    userId: <input type="text" name="userId" value="<?php 
if (isset($_REQUEST['userId'])) {
    echo htmlentities($_REQUEST['userId']);
}
?>
"><br/>
    <input type="submit">
<input type="hidden" name="go">
</form>
<?php 
include '../infusionsoft.php';
include 'testUtils.php';
if (isset($_REQUEST['go'])) {
    $out = Infusionsoft_SearchService::getAllReportColumns($_REQUEST['savedSearchId'], $_REQUEST['userId']);
    var_dump($out);
}
<form>
    userId: <input type="text" name="userId" value="<?php 
if (isset($_REQUEST['userId'])) {
    echo htmlentities($_REQUEST['userId']);
}
?>
"><br/>
    <input type="submit">
<input type="hidden" name="go">
</form>
<?php 
include '../infusionsoft.php';
include 'testUtils.php';
if (isset($_REQUEST['go'])) {
    $out = Infusionsoft_SearchService::getDefaultQuickSearch($_REQUEST['userId']);
    var_dump($out);
}
<form>
    savedSearchId: <input type="text" name="savedSearchId" value="<?php 
if (isset($_REQUEST['savedSearchId'])) {
    echo htmlspecialchars($_REQUEST['savedSearchId']);
}
?>
"><br/>
    userId: <input type="text" name="userId" value="<?php 
if (isset($_REQUEST['userId'])) {
    echo htmlspecialchars($_REQUEST['userId']);
}
?>
"><br/>
    pageNumber: <input type="text" name="pageNumber" value="<?php 
if (isset($_REQUEST['pageNumber'])) {
    echo htmlspecialchars($_REQUEST['pageNumber']);
}
?>
"><br/>
    <input type="submit">
<input type="hidden" name="go">
</form>
<?php 
include '../infusionsoft.php';
include 'testUtils.php';
if (isset($_REQUEST['go'])) {
    $out = Infusionsoft_SearchService::getSavedSearchResultsAllFields($_REQUEST['savedSearchId'], $_REQUEST['userId'], $_REQUEST['pageNumber']);
    var_dump($out);
}
<form>
    userId: <input type="text" name="userId" value="<?php 
if (isset($_REQUEST['userId'])) {
    echo htmlentities($_REQUEST['userId']);
}
?>
"><br/>
    <input type="submit">
<input type="hidden" name="go">
</form>
<?php 
include '../infusionsoft.php';
include 'testUtils.php';
if (isset($_REQUEST['go'])) {
    $out = Infusionsoft_SearchService::getAvailableQuickSearches($_REQUEST['userId']);
    var_dump($out);
}
}
?>
"><br/>
    userId: <input type="text" name="userId" value="<?php 
if (isset($_REQUEST['userId'])) {
    echo htmlspecialchars($_REQUEST['userId']);
}
?>
"><br/>
    pageNumber: <input type="text" name="pageNumber" value="<?php 
if (isset($_REQUEST['pageNumber'])) {
    echo htmlspecialchars($_REQUEST['pageNumber']);
}
?>
"><br/>
    returnFields (comma Seperated - NO SPACES): <input type="text" name="returnFields" value="<?php 
if (isset($_REQUEST['returnFields'])) {
    echo htmlspecialchars($_REQUEST['returnFields']);
}
?>
"><br/>
    <input type="submit">
<input type="hidden" name="go">
</form>
<?php 
include '../infusionsoft.php';
include 'testUtils.php';
if (isset($_REQUEST['go'])) {
    $out = Infusionsoft_SearchService::getSavedSearchResults($_REQUEST['savedSearchId'], $_REQUEST['userId'], $_REQUEST['pageNumber'], explode(",", $_REQUEST['returnFields']));
    var_dump($out);
}
<?php

include '../infusionsoft.php';
$savedSearchResults = array();
//I don't remember if the first page is 0 or 1, so change this if you need to.
$page = 0;
$userId = 1;
$savedSearchId = 141;
do {
    $savedSearchResults = Infusionsoft_SearchService::getSavedSearchResultsAllFields($savedSearchId, $userId, $page);
    $page++;
    //Do stuff with saved search results here...
    var_dump($savedSearchResults);
} while (count($savedSearchResults) > 0);