You need to sign in to do that
Don't have an account?
anantha Lakshmi kuppala
Method does not exist or incorrect signature: void getLwcContacts() from the type dfsmlwccontroller
public class dfsmlwccontroller {
@AuraEnabled(cacheable=true)
public static List<Contact> getLwcContacts(string accountId){
return [SELECT Id, Name FROM Contact WHERE accountId=:accountId];
}
}
while running statement dfsmlwccontroller.getLwcContacts(); using debug open excute anonymos window getting
Line: 1, Column: 19
Method does not exist or incorrect signature: void getLwcContacts() from the type dfsmlwccontroller
@AuraEnabled(cacheable=true)
public static List<Contact> getLwcContacts(string accountId){
return [SELECT Id, Name FROM Contact WHERE accountId=:accountId];
}
}
while running statement dfsmlwccontroller.getLwcContacts(); using debug open excute anonymos window getting
Line: 1, Column: 19
Method does not exist or incorrect signature: void getLwcContacts() from the type dfsmlwccontroller
As per the apex class, the method also accept the parameter So while calling or executing such method, you need to pass the parameter as well like below :-
Kindly mark it as the best answer if it helps you.
Thank you
run this method by using following way.
Account acc = [select Id,name from Account limit 1];
dfsmlwccontroller.getLwcContacts(acc.Id);
let me know by marking it as best answer.
Thank you