Activity › Forums › Salesforce® Discussions › Which Objects can we access without using seeAllData=true?
Tagged: Apex Class, Apex Component, Apex Page, AsyncApexjob, Corn Trigger, Custom Metadata Type, Record Type, Salesforce Objects, seeAllData
-
Which Objects can we access without using seeAllData=true?
Posted by Prachi on August 2, 2018 at 2:04 PMWhich Objects can we access without using seeAllData=true?
shariq replied 7 years, 8 months ago 5 Members · 4 Replies -
4 Replies
-
Hi Prachi,
We use seeAllData = true to get real-time data in the test class, but without using this also you can get the data from the following objects.
User, profile, organization, AsyncApexjob, Corntrigger, RecordType, ApexClass, ApexComponent, ApexPage and custom metadata types.Thanks.
- [adinserter block='9']
-
Hi,
use the isTest(SeeAllData=true) annotation to grant test classes and individual test methods access to all data in the organization,
1) If a test class is defined with the isTest(SeeAllData=true) annotation, this annotation applies to all its test methods whether the test methods are defined with the @isTest annotation or the testmethod keyword
2) The isTest(SeeAllData=true) annotation is used to open up data access when applied at the class or method level
Use the isTest(SeeAllData=true) means you need to create the test data in your org.
Thanks.
-
hi
User, profile, organization, AsyncApexjob, Corntrigger, RecordType, ApexClass, ApexComponent, ApexPage and custom metadata types. when we use seeAllData = true to get real-time data in the test class, but without using this also you can get the data from the following objects.
Thanks
-
Hi,
- User
- profile
- organization
- AsyncApexjob
- Corntrigger
- RecordType
- ApexClass
- ApexComponent
- ApexPage
- custom metadata types.
Hope this helps
Log In to reply.