A very simple script that calls MSSQL to retreive all the records from a table. I get the first 20 records (of 854), how do i go about getting the remaining records (pages)?
thanks
bill
script below
import { exports } from 'integrator-api'
function _mainExport (options) {
let invokeExportResponse;
let response = {};
let PORObject = return_POR_JobSites_Obj (options);
//Execute the export
try {
invokeExportResponse = exports.runVirtual({export:PORObject});
//invokeExportResponse = PORObject;
response.statusCode = 200;
} catch(e) {
invokeExportResponse = JSON.stringify(e);
response.statusCode = 400;
}
// Create body response
response.body = invokeExportResponse;
return {
statusCode: response.statusCode,
headers: { },
body: response.body
}
}
function return_POR_JobSites_Obj (custId) {
let PORObject = {
"_connectionId": "60***************53",
"apiIdentifier": "ea*****13",
"asynchronous": true,
"oneToMany": false,
"parsers": [],
"rdbms": {
"query": "Select * from [POR99].[dbo].[CustomerJobSite]"
},
"adaptorType": "RDBMSExport"
}
return PORObject;
}