You need to sign in to do that
Don't have an account?
venurao
Please Help me on the following Error
my Apex Program as follows
public class tatasearch {
public tatasearch()
{
cust=new Customer_Details__c();
}
public Customer_Details__c cust{set;get;}
public List<Customer_Details__c> mySearch()
{
List<List<Customer_Details__c>> searchList=[FIND '{venu rao}' IN NAME FIELDS RETURNING Customer_Details__c(RC_Number__c,Name) LIMIT 15];
return cust;
}
}
I got the error on return statement
Error: tatasearch Compile Error: Return value must be of type: LIST<Customer_Details__c>
please help me for this............
Change the return type like this
public class tatasearch {
public tatasearch()
{
cust=new Customer_Details__c();
}
public Customer_Details__c cust{set;get;}
public List<List<Customer_Details__c>> mySearch()
{
List<List<Customer_Details__c>> searchList=[FIND '{venu rao}' IN NAME FIELDS RETURNING Customer_Details__c(RC_Number__c,Name) LIMIT 15];
return searchList;
}
}
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
All Answers
public class tatasearch {
public tatasearch()
{
cust=new Customer_Details__c();
}
public Customer_Details__c cust{set;get;}
public List<Customer_Details__c> mySearch()
{
List<List<Customer_Details__c>> searchList=[FIND '{venu rao}' IN NAME FIELDS RETURNING Customer_Details__c(RC_Number__c,Name) LIMIT 15];
return searchList;
}
}
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Already I tried this one also ...it's not work out....
Change the return type like this
public class tatasearch {
public tatasearch()
{
cust=new Customer_Details__c();
}
public Customer_Details__c cust{set;get;}
public List<List<Customer_Details__c>> mySearch()
{
List<List<Customer_Details__c>> searchList=[FIND '{venu rao}' IN NAME FIELDS RETURNING Customer_Details__c(RC_Number__c,Name) LIMIT 15];
return searchList;
}
}
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Thanks Dude.......