• Ashutosh Salgaonkar
  • 20 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
  • 0
seeing this error in console.
and a parameter is not getting passed to AuraEnabled method while developing lightning Application
While developing a lightning component I wanted to access a sforce object FiscalYearSetting from Controller. Will it work when someone else uses my component?
Error:Executing the 'searchForContacts' method failed. Either the method does not exist, is not static, or does not return the expected contacts.

public class ContactSearch {

    public static List<Contact> searchForContacts(String lastName, String mailingPostalCode){
        List<Contact> contactList=null;

        contactList=[SELECT Id,Name from Contact where (Last_Name__c=:lastName OR MailingPostalCode=:mailingPostalCode)];
        return contactList;