You need to sign in to do that
Don't have an account?
Yang Wang
isClone() func does not work for cloning from UI
Hi Guys
when I am cloning from UI by clicking "clone" standard button, Its returning :false. On the other hand if I am doing it from APEX its returning " True".
lead c = new lead(id='00Q9000000xfFHVEA2');
lead cd = c.clone();
system.debug(cd.isclone());
USER_DEBUG|[5]|DEBUG|true
Does anyone know how to identify a new reocrds was cloned from UI in apex.
when I am cloning from UI by clicking "clone" standard button, Its returning :false. On the other hand if I am doing it from APEX its returning " True".
lead c = new lead(id='00Q9000000xfFHVEA2');
lead cd = c.clone();
system.debug(cd.isclone());
USER_DEBUG|[5]|DEBUG|true
Does anyone know how to identify a new reocrds was cloned from UI in apex.
We can maintain a checkbox field (isCloned__c) and when record is creating by cloned record we can make it the checkbox as True. Please see below code.
Please let me know if this way help you to fulfil your requirement
Thanks,
Prem Anandh
Thanks for your help.
I understand your solution.
but I wonder how to distinguish a record was created by standard "clone" button.
Regards,
Yang