I have a simple piece of code but I'm getting an error:
Compile Error: Method must define a body at line 28 column 25.
I'm new to Salesforce development and can't figure out this error
global with sharing class MyController {
public String allSectors {
get {
List<String> sectors = GetSectors();
allSectors = '';
for (String i : sectors)
{
if (allSectors == '')
{
allSectors = i;
}
else
{
allSectors += ',' + i;
}
}
return allSectors;
}
set;
}
public MyController()
{
//do something
}
public List<string> GetSectors();
{
List<String> sectorList = new List<String>();
//populate list
return sectorList;
}
@RemoteAction
global static String GetSectorDetails(string sectorName)
{
return 'something';
}
}
Any help will be highly appreciated.