function get_all_recs() {
console.log('Getting all records');
ZOHO.CREATOR.init().then(function (data) {
let config = {
reportName: 'All_Visitors'
};
console.log(config);
ZOHO.CREATOR.API
.getAllRecords(config)
.then(function (response) {
if (response.code == 3000) {
console.log('All records fetched, see table');
let counter = 0;
OBJECT_GLOBAL = response.data;
CreateTableFromJSON();
return OBJECT_GLOBAL;
}
})
.catch(function (data) {
alert(data.responseText);
console.log('Boss, we have a little problem');
console.log(data.responseText);
});
});
}