Last active
August 29, 2015 13:59
-
-
Save mickle00/10923143 to your computer and use it in GitHub Desktop.
This file contains 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
List<Case> c = [SELECT Id, isDeleted FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
system.debug(c.size()); //1 | |
//Formula field | |
c = [SELECT Id, Created_During_Business_Hours__c FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
system.debug(c.size()); //0 | |
//Created_During_Business_Hours__c uses this field in formula | |
c = [SELECT Id, Actual_Case_Start_Time__c FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
system.debug(c.size()); //0 | |
try{ | |
c = [SELECT Id FROM Case WHERE Id = '500C000000VlnSsIAJ']; | |
c[0].Subject = 'WHY WONT YOU WORK'; | |
update c; | |
} catch (Exception e){ | |
system.debug(e); | |
//12:25:12:123 EXCEPTION_THROWN [15]|System.DmlException: Update failed. First exception on row 0 with id 500C000000VlnSsIAJ; first error: INSUFFICIENT_ACCESS_OR_READONLY, insufficient access rights on object id: [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment