You need to sign in to do that
Don't have an account?
Rahul Allada
isClone() not working as expected
Account acc = new account(name='Rahul');
insert acc;
account acc1 = acc.clone();
insert acc1;
Account accc = [select id from account where id =: acc1.id];
system.debug(accc.isClone());//Supposed to display true
But it is being displayed as False.
It is supposed to show true as acc1(accc) is a clone of acc
Returns true if an entity is cloned in your use case acc which is an actual record in database will show true and isClone() will written false.
Please mark as Best Answer if above information was helpful so that it can help others in the future.
Thanks,