You need to sign in to do that
Don't have an account?
vijendhar
Constructor not defined: [selectoption].<Constructor>(String, String): error in line 17
public class ChildRelationshipExample {
public List<SelectOption> options;
public List<SelectOption> getOptions(){
return options;
}
public ChildRelationshipExample(){
options = new List<SelectOption>();
Schema.DescribeSobjectResult r = Account.SobjectType.getDescribe();
List<Schema.childRelationship> c = r.getChildRelationShips();
for(schema.childRelationship x:c){
String name = ' '+x.getChildSObject();
SelectOption op = new SelectOption(name,name);
options.add(op);
}
}
}
Constructor not defined: [selectoption].<Constructor>(String, String)
can any one help me to solve these problem
public List<SelectOption> options;
public List<SelectOption> getOptions(){
return options;
}
public ChildRelationshipExample(){
options = new List<SelectOption>();
Schema.DescribeSobjectResult r = Account.SobjectType.getDescribe();
List<Schema.childRelationship> c = r.getChildRelationShips();
for(schema.childRelationship x:c){
String name = ' '+x.getChildSObject();
SelectOption op = new SelectOption(name,name);
options.add(op);
}
}
}
Constructor not defined: [selectoption].<Constructor>(String, String)
can any one help me to solve these problem
All Answers
Please let us know if this will help you
Thanks,
Amit Chaudhary
Amit absolutely you are right...!
Vijendhar, You have a class named as "Selectoption" in your organization. Please delete or rename the class, then try again to save your code.
Thanks.