You need to sign in to do that
Don't have an account?
davidleckenby
Can you change the system date in a Sandbox environment for testing purposes?
We need to simulate running monthly scheduled batch apex jobs over multilple months/year to see mutiple records instances being recaluculed over time.
I can see that there are some comments from 2011 saying that this is not possible but just wanted to check in 2019? I am guessing not but just thought to ask.
I can see that there are some comments from 2011 saying that this is not possible but just wanted to check in 2019? I am guessing not but just thought to ask.
All Answers
You can simulate that through a test class as Salesforce does allow change the createddate test classes. Please follow the link for details
http://releasenotes.docs.salesforce.com/en-us/spring16/release-notes/rn_apex_tests.htm#rn_apex_tests_setcreateddate
Option 2:
Import Test Data with the required createddate and createdby
https://success.scribesoft.com/s/article/Overriding-Create-Date-By-Fields-when-Migrating-Salesforce-Records