Created
February 10, 2018 17:51
-
-
Save Frelseren/150685ae05769b11023723f6c21f1bcd to your computer and use it in GitHub Desktop.
AngularPOC Apex class with Remote Action
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 AngularPOC { | |
@RemoteAction | |
public static List getContacts() { | |
return [SELECT Id, Name FROM Contact]; | |
} | |
@RemoteAction | |
public static Contact getContact(String contactId) { | |
return [SELECT Id, Name, Title, Phone, Email FROM Contact WHERE Id =: contactId]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment