// Parent table
const linkedTableName = 'Books';
// Child table
const tableName = 'Requests';
// Get linkId of the column in child table
const linkId = base.getColumnLinkId('Requests', 'Book Name');
// Create new record in child table and get its id
const newRow = base.addRow(tableName, {});
const rowId = newRow['_id'];
// Get current record id
const currentRow = base.context.currentRow;
const linkedRowId = currentRow['_id'];
// Add the link of the current record to the new record created
base.addLink(linkId, tableName, linkedTableName, rowId, linkedRowId);