You need to sign in to do that
Don't have an account?
Mark Mulholland 3
Can you retrieve the Async limits from a class?
Hello,
I can see there is a REST API that can be called so we can see where we are currently with all of the Salesforce limits. https://instance.salesforce.com/services/data/v37.0/limits/
We would like to be able to track the limits periodically using a trigger. Inside this trigger we would like to view the Daily Async Apex Executions, and do something if the number left is below a threshold
The only method that I can see of grabbing this number real time is with that REST API. Is there another way to grab that number? e.g. is there an object that I can query using SOQL? Alternatively, am I wrong in thinking it's impossible to grab the results from that REST API in a trigger?
I have searched for all resources on the topic and have come up blank. If someone could shine a light on this it would be greatly appreciated
Thanks
Mark
I can see there is a REST API that can be called so we can see where we are currently with all of the Salesforce limits. https://instance.salesforce.com/services/data/v37.0/limits/
We would like to be able to track the limits periodically using a trigger. Inside this trigger we would like to view the Daily Async Apex Executions, and do something if the number left is below a threshold
The only method that I can see of grabbing this number real time is with that REST API. Is there another way to grab that number? e.g. is there an object that I can query using SOQL? Alternatively, am I wrong in thinking it's impossible to grab the results from that REST API in a trigger?
I have searched for all resources on the topic and have come up blank. If someone could shine a light on this it would be greatly appreciated
Thanks
Mark
You can use in the trigger ( Call as feature calls from the trigger ). See the code here for testing. Please follow some standard best practices.
All Answers
You can use in the trigger ( Call as feature calls from the trigger ). See the code here for testing. Please follow some standard best practices.
Thank you, I was afraid that because it was a RES API call that I wouldn't be able to call it and view the response in the same trigger
I'll get to implementing this now
Mark
I am working on closecto same requiremnts. My need is send an alert to couple of users if daily limits of Async Apex Executions reaches a threshold of 70%.
If 70%of daily limit of Async Apex Execution Reaches then an alert notification should go to few users say User A and User B.
Kindly help me on above requirements.
Any help will be greatly appreciated.
Many thanks in advance
Thanks & Regards,
Harjeet