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
PSS_ITPSS_IT 

Clone Case Controller

How can you create an apex class for case object that would

 

- close current case

- clone current case by inserting new record

- change record type

 

 

osamanosaman

You can use update call in Apex to update the case status and close it. You can use the same update call in apex to change the record type of case by updating RecordTypeId field.

 

You can use Clone() method to clone an existing record. However, the clone method takes 2 arguements. Do read about the,

 

 

Thanks