Clone for tables

  • 1
  • Idea
  • Updated 3 years ago
  • Implemented
It would be great to be able to add a record level "clone" button to a table
Photo of ktyler

ktyler

  • 9,244 Points 5k badge 2x thumb

Posted 6 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Official Response
This is now possible to do without any code at all using the Action Framework, using the "Create new row in Model" Action.

1. Add a Row Action (or Mass Action, for mass-cloning!) to your Table.
2. Action Type should be "Run Multiple Actions", Action Label should be "Clone" and Action Icon should be "sk-icon-clone"
3. Click on the Actions property category.
4. Click the + icon to add a new Action.
5. Action Type should be "Create new row" - select the same Model as your Table's Model.
6. Click the + icon on your Create new row action to add a Default Value to your new row. Do this for each field that you want to populate in your cloned row. The value should be {{{FieldName}}} where FieldName should be replaced with the name of each field, e.g. "{{{FirstName}}}", "{{{LastName}}}", "{{{My_Custom_Field__c}}}". Only do this for createable fields on your model --- for instance, don't try to clone Id, CreatedDate, LastModifiedById because this won't work and is not necessary.







And voila, here's what you get --- row-level and/or mass-action cloning!