You need to sign in to do that
Don't have an account?
Chait_SFDC
Can we create records in Site object using Apex Test class?
I have an Apex class that has "Site site = [select Id from Site limit 1];". I wrote a test class but my test class is failing because there are no sites defined in my sandbox organization. The question is, can we create a dummy site using a test class so it gets deleted automaitcally? If yes, can someone give me sample code on how to do that? Thanks in advance for all your help.
Regards
Chait
Regards
Chait
reference: https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_site.htm
All Answers
reference: https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_site.htm