How to make a duplicate record

John Prouty
Kilo Guru

I want to give the user a button that will duplicate (copy) the current record so they don't have to re-enter all the data and can only focus on the differences.  I was looking at the Flow Designer and an Update Trigger, but all I could see was where I would have to explicitly identify each and every field in the record to do the copy.  Is there a way to code a loop that would copy all the fields from one record in the table to another record in the table?  Then I would make the one change to link them together.

1 ACCEPTED SOLUTION

John Prouty
Kilo Guru

I have concluded that I can only do this by explicitly reference each field in the trigger.

View solution in original post

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Hi John,

 

For which application (incident, change, etc.) you are looking for this functionality of copy.

It is a custom application.  I have a UI Action that sets the State = "Duplicate".  Now I am trying to code an Update Trigger (using Flow Designer) to check the State.  If it is "Duplicate", I want the action to Create a new Record and then copy all the data from the current record into the new record.  And then I will update the record with the parent of the current record.

Deepak Singh Ra
Tera Contributor

Hi

 

Please have a look on OOB UI Action "Insert and stay UI " and modify your code acordingly.

 

Thanks

I need to do this as part of Update Trigger (there is other logic that needs to be coordinated with the copy).