# How to allow users to duplicate a record?

**URL:** <https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240>\
**Category:** Get Answers\
**Created:** [February 19, 2026, 2:26pm UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240 "2026-02-19T14:26:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JDWorleyKY](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@JDWorleyKY](https://forums.knack.com/u/JDWorleyKY)\
**Post date:** [February 19, 2026, 2:26pm UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240/1 "2026-02-19T14:26:22Z")

</div>

I searched and couldn’t find a simple answer here or in KTL. I would like users to be able to make a copy of a single record at a time, and include pre-defined fields to be replicated into the new record. Is there a simply way to do this? I’ve tried using some API/js code I found here, but Claude has me going in circles trying to get it to work error-free.

Here’s what I’ve got so far, but I keep getting CORS errors trying to run it:

$(document).on(‘knack-view-render.view\_634’, function(event, view, data) {

// Add a duplicate button to the view header

var $button = $(‘Duplicate Record’);

$(‘#view\_634 .view-header’).append($button);

$button.on(‘click’, function() {

var recordId = data.id; // The current record’s ID

// Fields you want to copy — map field keys to their values

var newRecord = {

```
  field_440: data.field_440_raw || data.field_440,

  field_441: data.field_441_raw || data.field_441,

  field_1497: data.field_1497_raw || data.field_1497

```

// Add/remove fields as needed

};

// POST the new record to your object

```
$.ajax({

  url: Knack.api_url + '/v1/objects/object_35/records',

  type: 'POST',

  headers: {

```

‘X-Knack-Application-Id’: Knack.application\_id,

‘X-Knack-REST-API-Key’: ‘knack’,

‘Authorization’: Knack.getUserToken()

// ← Remove Content-Type header entirely

},

// Use contentType and processData instead

```
  contentType: 'application/json',

  data: JSON.stringify(newRecord),

  success: function(response) {

    alert('Record duplicated! New record ID: ' + response.id);

```

},

```
  error: function(xhr, status, err) {

    console.error('Error:', xhr.responseText);

```

}

});

});

});

---

<div class="post-metadata">

**Author:** ![Dean2](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@Dean2](https://forums.knack.com/u/Dean2)\
**Post date:** [February 19, 2026, 9:00pm UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240/2 "2026-02-19T21:00:51Z")

</div>

Hi

Wouldn’t the simplest solution for this situation be to use the KTL bulk operations feature with an Action Link?

 ![Copy Shifts Forward 7 Days - result](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/4/466fae0c4c2c8773bfa531f1a67dee3ed5bb6fb7.png)

 ![Copy Shifts Forward 7 Days - Action Link fields](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/c/cd026872a9a7a2415bc6a8bb0edcc76283a8928c.png)

 ![Copy Shifts Forward 7 Days - result](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/4/466fae0c4c2c8773bfa531f1a67dee3ed5bb6fb7.png)

Dean

---

<div class="post-metadata">

**Author:** ![NormandDefayette\_CortexRD](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/normanddefayette_cortexrd/32/855_2.png) [@NormandDefayette\_CortexRD](https://forums.knack.com/u/NormandDefayette_CortexRD)\
**Post date:** [February 20, 2026, 2:04am UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240/3 "2026-02-20T02:04:31Z")

</div>

@JDWorleyKY,

The KTL’s Bulk Duplicate is designed to accomplish just that.

1- Did you try it?  
2- Where did it fail? Connected fields, field types or format unsupported, etc  
3- Can you provide us with your typical use case?

Norm

---

<div class="post-metadata">

**Author:** ![NormandDefayette\_CortexRD](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/normanddefayette_cortexrd/32/855_2.png) [@NormandDefayette\_CortexRD](https://forums.knack.com/u/NormandDefayette_CortexRD)\
**Post date:** [February 20, 2026, 2:30pm UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240/4 "2026-02-20T14:30:21Z")

</div>

I’ve just found a KTL bug about Bulk Duplicate, where it wouldn’t copy anything if at least one top header checkbox was selected. The documentation states that if none are checked, then all fields are copied, but this wasn’t implemented as such.

I’ve fixed the bug today, and will deploy soon.

In the meantime, you can get around this by selecting all checkboxes manually.

**Tip** : Ctrl+Click one of them toggles them all

 ![image](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/5/59c1ffe69e56afb8b26508e7e080e5fc4ee6125e.png)

Norm

---

<div class="post-metadata">

**Author:** ![Nick](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Nick](https://forums.knack.com/u/Nick)\
**Post date:** [February 25, 2026, 2:40pm UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240/5 "2026-02-25T14:40:09Z")

</div>

try this. [Copy a Record Using Record Actions](https://docs.knack.com/v3/docs/copy-a-record-using-record-actions)

---

<div class="post-metadata">

**Author:** ![JDWorleyKY](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@JDWorleyKY](https://forums.knack.com/u/JDWorleyKY)\
**Post date:** [February 25, 2026, 9:31pm UTC](https://forums.knack.com/t/how-to-allow-users-to-duplicate-a-record/20240/6 "2026-02-25T21:31:24Z")

</div>

This worked great, thanks!! I had tried this many times before, but I was getting stuck until I read where i needed to add a Connection back to the same Object. Now it works great with one click and no code! 😊
