You need to sign in to do that
Don't have an account?
Pranav Chitrans
Trigger To create Duplicate Lead
I wan to write trigger in such a way that when ever a new lead is created, with the same name i want to create another lead... In short.. I want to create the clone of lead... when new lead is getting created... plz help..
All Answers
That being said, if you use a Process instead of a Trigger, this is really simple. Create a process by going to Setup->Create->Workflow and Approvals->Process Builder. After you create a new process, add the Lead as the object and run the process when the record is created. Set the criteria to always execute if you need, and then add a Record Create action to create the Lead record. Map the fields you need. Save and Activate the process. Then test it.
In process builder.. how we can get the old record value from recent inserted data.. like if i create the lead withn lastName XYZ and Company is Twitter... then the New lead should have the same value... like XYZ as lastName and Twitter as company name and so on.....
hey Ketankumar Patel,
I tried your above code but it does not create any duplicate lead with same name and company....
Did you try to update your existing lead or did you try to create brand new lead?
I tested above code. Whenever I create new lead it automatically copy all lead fields and create duplicate lead with all same information.