Last active
August 29, 2015 14:15
-
-
Save joshbirk/880e17ce038739b63109 to your computer and use it in GitHub Desktop.
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 DisplayCaseController { | |
| @AuraEnabled | |
| public static Case getCaseFromId(Id caseID) { | |
| if(caseID == null) { | |
| return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1]; | |
| } | |
| List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ]; | |
| if(cases.size() == 0) { | |
| return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1]; | |
| } else { | |
| return cases[0]; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment