Skip to content

Instantly share code, notes, and snippets.

@burlistic
Created December 4, 2023 09:11
Show Gist options
  • Save burlistic/ce031afcda5b4056f67bf8e63f78c0a5 to your computer and use it in GitHub Desktop.
Save burlistic/ce031afcda5b4056f67bf8e63f78c0a5 to your computer and use it in GitHub Desktop.
APEX Contact Search Salesforce
public class ContactSearch {
public static List<Contact> searchForContacts(String lastName, String postCode){
Contact[] cts = [SELECT ID, Name FROM Contact
WHERE LastName= :lastName AND MailingPostalCode= :postCode ];
System.debug(cts);
return cts;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment