You need to sign in to do that
Don't have an account?

Inserting data to audit field like created date for test class
I am creating a test class and the scenario I am testing requires an older date for the created date. I know CreatedDate is an audit field and I can't write to it. Is there a workaround I could use for writing my test class?
Thanks.
The easy way is to use the new Test.loadData method to load some sample records from a static resource.