Answers for "zoho fetch"

3

zoho fetch

//gets ALL the records in the report. Note a maximum of 200 records can be downloaded per api call and the default is 100 records
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();//building the table
					return OBJECT_GLOBAL;
				}
			})
			.catch(function (data) {
				alert(data.responseText);
				console.log('Boss, we have a little problem');
				console.log(data.responseText);
			});
	});
}
Posted by: Guest on December-25-2021

Browse Popular Code Answers by Language