• fatih çelik 4
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Error:Executing the 'searchForContacts' method failed. Either the method does not exist, is not static, or does not return the expected contacts.

Code:
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;
    }
}