2

Move your callout and parsing logic to the start method of your batchable class. This method has 12MB of heap available compared to synchronous code's 6MB of available heap.


2

If you want to schedule apex within Salesforce, you need to implement Schedulable - even if it is just to run daily. Then, you can write a cron expression to schedule it how you'd like or use the UI to schedule it as well. There's also now Scheduled Flows which presents another option although I believe it's limited to 250,000 flow interviews a day so you ...


2

It can. It depends on what exactly your Apex code is doing and how long each callout takes. Assuming each function makes exactly one callout, the primary governor limit to be concerned about is probably Maximum timeout for all callouts (HTTP requests or Web services calls) in a transaction: 120 seconds If you are not changing the default timeout of 10 ...


2

So basically you need 30 jobs to run in that time frame. You can schedule 30 jobs each running only once in 24 hours and each with a interval of 2 minutes. DailyLeadProcessor objDailyLeadProcessor = new DailyLeadProcessor(); for (Integer i = 0; i < 30; i++) { Integer intTime = i * 2; String cronExpr = '0 '+intTime+' 15 ? * * *'; System....


1

Your interviewer may have been trying to trick you as the best answer is to use a Validation Rule on Account Name: IsInvalidCreationMonth Expression: MONTH(DATEVALUE(CreatedDate)) = 12 Error: Accounts can not be created in December


1

For starters, you should make sure you understand trigger frameworks in Salesforce and how your org can benefit from them. There are quite a few resources that already discuss these. Some good examples can be found in the answers to this question: Generic Apex Trigger To answer your question, you could create a utility class/method that could accept a ...


1

Test.stopTest() executes queued anonymous code, then resets the governor limits afterwards. You'll never see things like Limits.getEmailInvocations greater than zero, or other consumed limits. Further, things like "LastRunTime" aren't run until the transaction finalizes, which for a unit test, is after the last line of code executes. Accordingly, ...


Only top voted, non community-wiki answers of a minimum length are eligible