Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Last active July 3, 2018 13:46
Show Gist options
  • Save choudharymanish8585/fd06f461982ba075acfe4f13a401ea73 to your computer and use it in GitHub Desktop.
Save choudharymanish8585/fd06f461982ba075acfe4f13a401ea73 to your computer and use it in GitHub Desktop.
public class ListViewController {
@AuraEnabled
public static list<String> fetchListViews(String strObjName) {
list<String> lstListViews = new list<String>();
if(strObjName != null && strObjName != ' ' && strObjName.length() != 0) {
list<ListView> lstViews = [Select Name,sobjectType From ListView where SobjectType =: strObjName];
for(ListView iterator:lstViews) {
lstListViews.add(iterator.Name);
}
}
return lstListViews;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment