This seems pretty simple. I'm just trying to retrieve records from a table view after clicking the submit button in a pop up modal form. When the code runs it doesn't return any results when I know that there are records in the table view. It just returns the standard object response with not records. Here is my code and nothing seems out of place to me. Any help would be appreciated.
/* Get all records from the task table */
$(document).on('knack-view-render.view_256', function(event, view) {
$("#view_256 .kn-button").on("click", function() {
$.ajax({
type: 'GET',
headers: {
'Authorization':Knack.getUserToken(),
'X-Knack-Application-Id':Knack.app.id,
'X-Knack-REST-API-KEY':'knack'
},
success: function(data) {
console.log(data);
},
error: function (error) {
console.log('Error ${error}');
}
});
});
});