Created
February 10, 2018 18:10
-
-
Save Frelseren/105f484c3e979adae1cd9b620430e90a to your computer and use it in GitHub Desktop.
AngularPOC Apex class Web Service
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
global class AngularPOC { | |
@RemoteAction | |
webservice static String getContacts() { | |
return JSON.serialize([SELECT Id, Name FROM Contact]); | |
} | |
@RemoteAction | |
webservice static String getContact(String contactId) { | |
return JSON.serialize([SELECT Id, Name, Title, Phone, Email FROM Contact WHERE Id =: contactId][0]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment