Last active
April 16, 2022 19:46
-
-
Save ganmahmud/90d45ce0852909eb2bd2208295d2b288 to your computer and use it in GitHub Desktop.
Create an Apex class that returns contacts based on incoming parameters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ContactSearch { | |
| public static Contact[] searchForContacts(String lastName, String postCode){ | |
| Contact[] cts = [SELECT Contact.ID,Contact.Name FROM Contact | |
| WHERE LastName = :lastName AND MailingPostalCode= :postCode]; | |
| return cts; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment