New answers tagged


Based on a cursory search, it appears the Yahoo Finance API is no longer available One alternative, and there are many is Intrinio. Free APIs tend to be severely rate-limited but low cost monthly paid APIs are available from vendors If the companies don't have a current ticker symbol listed than would you pass the account name to the API? Or would you ...


CronTrigger behaves like, for example, User in unit test context - that is, it's treated as a metadata object which is visible inside test isolation. That makes writing assertions against it more challenging, because you're always vulnerable to org data state. One approach you can apply here is to snapshot the count prior to invoking your Schedulable: ...


I know this is an old post but I was dealing with the same issue. It turned out to be nasty little issue and since I could not find a satisfactory solution I have build a little generic framework which I put on Github. I hope this will help others.


I made the method being tested return Id for the scheduled job and had to query before test.stopTest() to see the job. The following code worked. test.startTest(); Id schId =ProcessAddressUpload.PollForVerification(batchProcessId,addressIds,acc.Id,documents[0].Id); List<CronTrigger> jobs = [SELECT Id, CronJobDetail.Name,CronJobDetail....

Top 50 recent answers are included