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
Kirtish ShrotriyaKirtish Shrotriya 

custom clone a record and redirect to that page after save in lightning

Hi, there is a scenario in my project where I want to clone case record using cutom cloning and after the cloning record get save it will redirect me to that newly created record detail page. How can I archive that in salesforce. I tried with force:createRecord but it won't return any url so that i can nevigate to that. Please help.
Rajesh Varma MudunuriRajesh Varma Mudunuri
This is how your code should flow.
  • Make a call from lightning component to apex method that returns your cloned new Sobject Id.
  • Once you get the Id to the component please fire an event force:navigateToSObject