Method : This just one method of the class I am testing from Dev console
public Employee__c getEmployeeDetails()
{
Employee__c emp = null;
emp = [SELECT field1__c, field2__c, field3__c FROM Employee__c WHERE Accountid__c ='001L000000ogtry' limit 1];
return emp;
}
Dev console :
classname cc = new Classname();
cc.getEmployeeDetails();
The SELECT query returns records when queried individually.
Any help on why it's occurring. Account id is being taken from url . Here I have hardcoded just to test.