-
-
Save anonymous/36e124b2d385a16876b1d2c0f0f622aa 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
public without sharing class dailyLimitsController { | |
public String nowTime {get;set;} | |
public Integer dailyAPIMax {get;set;} | |
public Integer dailyAPIRem {get;set;} | |
public Integer oDataMax {get;set;} | |
public Integer oDataRem {get;set;} | |
public Integer wfMax {get;set;} | |
public Integer wfRem {get;set;} | |
public Integer wfeMax {get;set;} | |
public Integer wfeRem {get;set;} | |
public Integer singleMax {get;set;} | |
public Integer singleRem {get;set;} | |
public Integer asyncMax {get;set;} | |
public Integer asyncRem {get;set;} | |
public dailyLimitsController(){ | |
Limits__c wfemail = Limits__c.getInstance('DailyWorkflowEmails'); | |
wfeMax = Integer.valueOf(wfemail.Max__c); | |
wfeRem = Integer.valueOf(wfemail.Remaining__c); | |
Limits__c dailyAPI = Limits__c.getInstance('DailyApiRequests'); | |
dailyAPIMax = Integer.valueOf(dailyAPI.Max__c); | |
dailyAPIRem = Integer.valueOf(dailyAPI.Remaining__c); | |
Limits__c oData = Limits__c.getInstance('HourlyODataCallout'); | |
oDataMax = Integer.valueOf(oData.Max__c); | |
oDataRem = Integer.valueOf(oData.Remaining__c); | |
Limits__c wfHourly = Limits__c.getInstance('HourlyTimeBasedWorkflow'); | |
wfMax = Integer.valueOf(wfHourly.Max__c); | |
wfRem = Integer.valueOf(wfHourly.Remaining__c); | |
Limits__c singleEmail = Limits__c.getInstance('SingleEmail'); | |
singleMax = Integer.valueOf(singleEmail.Max__c); | |
singleRem = Integer.valueOf(singleEmail.Remaining__c); | |
Limits__c async = Limits__c.getInstance('DailyAsyncApexExecutions'); | |
asyncMax = Integer.valueOf(async.Max__c); | |
asyncRem = Integer.valueOf(async.Remaining__c); | |
nowTime = async.LastModifiedDate.format('MM/dd/yyyy HH:mm:ss a'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment