You need to sign in to do that
Don't have an account?
penchala raju
i got an error like "Method does not exist or incorrect signature: [Schema.ChildRelationship].getChildObject()"" in 14th line of the program
public class SchemaFieldExample {
list<selectoption> options;
public list<selectoption>getoptions()
{
return options;
}
public SchemaFieldExample()
{
options=new list<selectoption>();
schema.DescribeSObjectResult r=Account.SobjectType.getDescribe();
list<schema.ChildRelationship> c=r.getChildRelationships();
for(schema.ChildRelationship x:c)
{
String name=''+x.getChildObject();
selectoption op=new selectoption(name,name);
options.add(op);
}
}
}
can any one solve this error
i got an error like "Method does not exist or incorrect signature: [Schema.ChildRelationship].getChildObject()"" in 14th line of the program
public class SchemaFieldExample {
list<selectoption> options;
public list<selectoption>getoptions()
{
return options;
}
public SchemaFieldExample()
{
options=new list<selectoption>();
schema.DescribeSObjectResult r=Account.SobjectType.getDescribe();
list<schema.ChildRelationship> c=r.getChildRelationships();
for(schema.ChildRelationship x:c)
{
String name=''+x.getChildObject();
selectoption op=new selectoption(name,name);
options.add(op);
}
}
}
[1] https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_class_Schema_ChildRelationship.htm
Please mark the question closed/solved if it is done.