Question about record.id

Hi Austin,

When writing JavaScript in Knack, the record ID is discoverable inside Records events and Interface Events. For example:

// Change view_1 to your form
$(document).on('knack-record-create.view_1', function(event, view, record) {
  // Do something after the record is created via form submission
  alert('created a new record with record ID: ' + record.id);
});

When inside the Builder, the record ID is discoverable by inspecting the HTML table row ID, see: Finding Record IDs. It would be nicer if this record ID were a column in each record by default—hopefully Knack implements this feature in the future—but that’s currently not offered. Please upvote this related Feature Request: Add Record ID in the builder

Hope this helps. If you need professional assistance, feel free to reach out.

Ian
Knack Pros

1 Like