You need to sign in to do that
Don't have an account?
How to query OpportunityHistory in apex test class
Hi Experts,
I am not able to query the opportunity history in a test class. If I tried to query the history, it returns null values. Please let me know how to use the opportunity history object in apex test class.
Thanks,
Vijay
I am not able to query the opportunity history in a test class. If I tried to query the history, it returns null values. Please let me know how to use the opportunity history object in apex test class.
Thanks,
Vijay
Is there any alternative option without using seeAllData = true option in test class?
I have try the same thing rigth now. And the conclusion is you can not query the OpportunityHistory without SeeAllData = true. Try my code once with SeeAllData = true and then SeeAllData = false and check the Debug you can easily understand what is happening behind.