You need to sign in to do that
Don't have an account?
Nishtha Gupta 23
Illegal assignment from List<Contact> to List<Contact>
public with sharing class Contact {
@AuraEnabled
public static list<Contact> contactlist(){
List<Contact> con = new List<Contact>();
con = [Select Id, Lastname from Contact limit 5];
system.debug(con);
return con;
}
}
@AuraEnabled
public static list<Contact> contactlist(){
List<Contact> con = new List<Contact>();
con = [Select Id, Lastname from Contact limit 5];
system.debug(con);
return con;
}
}
You cannot create a class with the name Contact. Contact is the Standard object.
Change the Class name to resolve this issue.
--
Magulan Duraipandian
https://www.infallibletechie.com/