You need to sign in to do that
Don't have an account?
Lee_Campbell
Impossible exception (no rows)
A query I'm running in a test:
Milestone1_Project__c x = [select id from Milestone1_Project__c limit 1];
Gives the "list has no rows" error, which is impossible, as there definitely exists some "Milestone1_Project__c" records. I have absolutely no idea why this is happening. Can anyone shed any light on the subject?
(I know it's common practice to create new records for use in a test, but I don't want to, for reasons I'll elaborate if anyone asks.)
Tests don't see all organization data by default since APi version 24. You need to have the following annotation:
more info at:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_isTest.htm
All Answers
Tests don't see all organization data by default since APi version 24. You need to have the following annotation:
more info at:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation_isTest.htm
Ah... cool. Thanks, Bob!