You need to sign in to do that
Don't have an account?
sagar077
Hello, Please me on this requirement. Create a set to find a unique industry(field on account) from the account.
Hello, Please me on this requirement. Create a set to find a unique industry(field on account) from the account.
Check this code and tell me where I am wrong.
Set <Account> indust = new Set <Account> ();
Account [] newindus = [SELECT Id,Name FROM Account WHERE Industry = 'Agriculture'];
set<Account> aa = new set<Account>();
for (Account aa : indust)
{
indust.add(aa.Industry);
}
System.debug('Name The Unique Industry ' + aa );
I am not getting the error please help me ..thanks
Check this code and tell me where I am wrong.
Set <Account> indust = new Set <Account> ();
Account [] newindus = [SELECT Id,Name FROM Account WHERE Industry = 'Agriculture'];
set<Account> aa = new set<Account>();
for (Account aa : indust)
{
indust.add(aa.Industry);
}
System.debug('Name The Unique Industry ' + aa );
I am not getting the error please help me ..thanks
If you find this information helpful. please mark this answer as Best. It may help others in the community. Thank You!
Anudeep
its not working