Documentation / @zerotal/admin / index / replicateAction
Function: replicateAction()
replicateAction():
Action
Defined in: admin/src/actions/Action.ts:385
Copy a record and open the copy for editing.
The primary key and timestamps are always dropped — a replica is a new row,
not a second claim on the original's identity. Add more with
.excludeAttributes(), or adjust the copy with .beforeReplicaSaved():
replicateAction()
.excludeAttributes(["slug"])
.beforeReplicaSaved((data) => ({ ...data, title: ${data.title} (copy) }))