You need to sign in to do that
Don't have an account?
![Surjendu Surjendu](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Can somebody solve this compilation error.
public DomainCreationData[] getHardCodedData()
{
DomainCreationData[] datas = new DomainCreationData[]{};
DomainCreationData data = new DomainCreationData();
TestExtranet__c[] extranets = [Select Name__c,Extranet_Name__c,URL__c from TestExtranet__c];
for(Integer i = 0; i < extranets.length; i++)
{
TestExtranet__c test = extranets.get(i);
data.setNonUniqueName(test.Name__c);
data.setDomainName(test.Extranet_Name__c);
data.setUrl(test.URL__c);
datas.add(data);
}
return datas;
}
Error: Compile Error: Initial term of field expression must be a concrete SObject: LIST:SOBJECT:TestExtranet__c at line 30 column 28
The line number 30 is : for(Integer i = 0; i < extranets.length; i++)
{
DomainCreationData[] datas = new DomainCreationData[]{};
DomainCreationData data = new DomainCreationData();
TestExtranet__c[] extranets = [Select Name__c,Extranet_Name__c,URL__c from TestExtranet__c];
for(Integer i = 0; i < extranets.length; i++)
{
TestExtranet__c test = extranets.get(i);
data.setNonUniqueName(test.Name__c);
data.setDomainName(test.Extranet_Name__c);
data.setUrl(test.URL__c);
datas.add(data);
}
return datas;
}
Error: Compile Error: Initial term of field expression must be a concrete SObject: LIST:SOBJECT:TestExtranet__c at line 30 column 28
The line number 30 is : for(Integer i = 0; i < extranets.length; i++)
![Surjendu Surjendu](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
sorry solved it...my bad