Skip to content

Instantly share code, notes, and snippets.

@Frelseren
Created February 10, 2018 17:51
Show Gist options
  • Save Frelseren/150685ae05769b11023723f6c21f1bcd to your computer and use it in GitHub Desktop.
Save Frelseren/150685ae05769b11023723f6c21f1bcd to your computer and use it in GitHub Desktop.
AngularPOC Apex class with Remote Action
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