You need to sign in to do that
Don't have an account?
Rob Crossley
Apex Clone Method Does Not Preserve Read Only Timestamps
When I try and execute an Object Clone through Execute Anonymous, the inserted records do not preserve read only timestamps even though I have set the parameter preserveReadonlyTimestamps = TRUE.
I saw from this idea that this parameter does not work as described in the documentation unless Salesforce support temporarily enables it. Reference: https://success.sfdc.cdnetworks.com/apex/ideaView?id=08730000000a5TGAAY
Salesforce Support was not able to turn this on for me because they believed it was solved by the recent Winter 16 release which allows for profiles to be able to modify system audit fields. However, with this permission enabled, the clone method still does not work as described in the documentation.
Salesforce Support said that the way to have this feature enabled was to post a question on the Developer Discussion board, where a Salesforce moderator would see it and be able to enable it for my Org.
Can someone from Salesforce please reach out to assist with this functionality?
I saw from this idea that this parameter does not work as described in the documentation unless Salesforce support temporarily enables it. Reference: https://success.sfdc.cdnetworks.com/apex/ideaView?id=08730000000a5TGAAY
Salesforce Support was not able to turn this on for me because they believed it was solved by the recent Winter 16 release which allows for profiles to be able to modify system audit fields. However, with this permission enabled, the clone method still does not work as described in the documentation.
Salesforce Support said that the way to have this feature enabled was to post a question on the Developer Discussion board, where a Salesforce moderator would see it and be able to enable it for my Org.
Can someone from Salesforce please reach out to assist with this functionality?
The new Winter '16 functionality is only supported on a specified list of standard object, but all custom objects - the documentation is here: http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_general_audit_fields_inactive_owners.htm.
Perhaps you're cloning an object not available to this new functionality?
All Answers
The new Winter '16 functionality is only supported on a specified list of standard object, but all custom objects - the documentation is here: http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_general_audit_fields_inactive_owners.htm.
Perhaps you're cloning an object not available to this new functionality?
I will reach back out to support for assistance with this feature enablement. Do you know if the feature can be enabled on the Email Message object with the help of Salesforce Support?
I'm also curious if anyone else has had success in cloning the Email Message or solving this issue in general, as it seems like this would be a common request: The reason that I want to clone the email message is because that way I can clone it without the Email Headers. In this way, I can reduce my storage usage while at the same time preserving the original audit fields.
Even i'm encountered with similar issue here. I'm doing a deepclone setting all the 3 parameters of clone method to true. In the logs i can see that system fields like ( createddate,createdby,lastmodifieddate ,lastmodifiedby) are overridden but it never shows up on detail page. Please let me now if this issue still persists in salesforce or if i'm missing anything.