Apex has two methods which help you to detect if a record is cloned or not. The following are the sObject methods used to avoid this: isClone(): It returns true if there is an entity being cloned from something. getCloneSourceId(): This method is used to return the entity ID from which an object has been cloned.