Skip to content

Instantly share code, notes, and snippets.

@sfmishra
Created March 23, 2019 19:28
Show Gist options
  • Save sfmishra/2cd8cde65cafdf72829c36f1cecb9f6d to your computer and use it in GitHub Desktop.
Save sfmishra/2cd8cde65cafdf72829c36f1cecb9f6d to your computer and use it in GitHub Desktop.
public class TowerMapController {
@AuraEnabled
public static List<Tower__c> getAllTowers() {
String theObject = 'Tower__c';
List<String> theFields = new List<String>{'Id', 'Name', 'State__r.Name', 'Location__Latitude__s', 'Location__Longitude__s'};
List<String> theFilters = new List<String>();
String sortField = 'Name';
String sortOrder = 'ASC';
List<Tower__c> allTowers = UtilityClass.queryObjects(theObject, theFields, theFilters, sortField, sortOrder);
return allTowers;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment