You need to sign in to do that
Don't have an account?
Constructor not defined: [selectOption].<Constructor>(String, String)
The following code in other people's development environment is right,but in my development environment is wrong.Why?
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('US','US'));
options.add(new SelectOption('CANADA','Canada'));
options.add(new SelectOption('MEXICO','Mexico'));
return options;
}
error:Constructor not defined: [selectOption].<Constructor>(String, String)
in addition:
PageReference acctPage = new ApexPages.StandardController(account).view();
error:Illegal assignment from System.PageReference to pageReference
what is the difference between System.PageReference and pageReference?
check your class version
my API version is 20.0
HI Raoyijun,
Check If any Class Which has the name select option and deactive or delete it..
Thanks,
jaba