+ 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
Hi,
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
Thanks