SObjectDeepClone
SObjectDeepClone copied to clipboard
A Apex Utility class to Clone a Salesforce SObject & and it's children.
- Provide method to update clone records - cache `SObjectDescribe` results
Add additional optional configuration to exclude fields and possibly children records (EG where clause). Currently this can be done by just nulling/removing them from the `clone` SObject instance property
Right now a single query is being generated, which means this is limited to 5 relationships. This limit could be increased by building separate queries for each relationship over 5.