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

Unable to get custom setting values while testing in SandBox env
Hi All, Recently I encountered a strange problem on SandBox environment. I am unable to get the values present in a custom settings while running test cases where as If I am running same test cases in Dev environment I am able to get the values. Any idea why it is behaving differently on Dev and SandBox env? Thanks in advance for your help! Regards, Naren
Thanks for letting me know. Me aslo just finded out from API version24 (Spring 2012) test cases are not allowd to use existing data in organization. They have to prepare data in test cases it self. Found this info on http://astreait.com/starting-with-spring-12-apex-test-cases-will-not-have-access-to-org-data/.
Thanks,
Naren
All Answers
Hi,
Go to corresponding test class where you are facing the problem. click Edit -> click on Version Settings and select the version same as your Dev org version (It Should be API Version 23.). Please check the Version and set the proper version.
Let me know if it answers your question.
Thank you
Annu.
Thanks for letting me know. Me aslo just finded out from API version24 (Spring 2012) test cases are not allowd to use existing data in organization. They have to prepare data in test cases it self. Found this info on http://astreait.com/starting-with-spring-12-apex-test-cases-will-not-have-access-to-org-data/.
Thanks,
Naren