function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Patrick Sullivan 34Patrick Sullivan 34 

Clone and update cloned record type

I am having a challenge where I need to, with one button click, clone a record and then change the record type of the original record.   This is on a custom object called Employee.  My record types are “Current” and “Historical”.  Ideally I will have an employee record the is “Current” that needs updated and my HR manager will go to that record.  She will then push a button that will convert that record to the “Historical” record type and clone the new employee record to the “Current” record type. 

Any help or ideas on how to accomplish this would be greatly appreciated.
Vivek DVivek D
If you are on Salesforce Classic 
Create a button onclick excute javascript call a apex class
Pass current record id clone it change the record type
Patrick Sullivan 34Patrick Sullivan 34
Hi Vivek,
Thanks for the response, but I am using Lightning now org wide. 
Jolene Scott-MartinJolene Scott-Martin
You can now use flows (screen flow) to do this with a custom button.