You need to sign in to do that
Don't have an account?
Surjendu
for loop not working properly
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(TestExtranet__c test : extranets)
{
data.setNonUniqueName(test.Name__c);
data.setDomainName(test.Extranet_Name__c);
data.setUrl(test.URL__c);
datas.add(data);
}
return datas;
}
This for loop does not give me the data. If there are four records saved in the database it always give me the 4th record 4 times. That means I am always retreiving the nth record n number of times. Please help.
{
DomainCreationData[] datas = new DomainCreationData[]{};
DomainCreationData data = new DomainCreationData();
TestExtranet__c[] extranets = [Select Name__c,Extranet_Name__c,URL__c from TestExtranet__c];
for(TestExtranet__c test : extranets)
{
data.setNonUniqueName(test.Name__c);
data.setDomainName(test.Extranet_Name__c);
data.setUrl(test.URL__c);
datas.add(data);
}
return datas;
}
This for loop does not give me the data. If there are four records saved in the database it always give me the 4th record 4 times. That means I am always retreiving the nth record n number of times. Please help.
Surjendu
solved it...stupid me...