In some orgs the daily 'Asperato Repeat Payment' job will fail with the message

"Access to entity 'AggregateResult' denied: Entity is not api accessible"


The work around is to delete the scheduled job and recreate it using a user account that has a 'system administrator' profile.


To remove the scheduled task go to Setup and search for 'Scheduled Jobs'. In the list there will be a job called 'Asperato Repeat Payment' and you should make a note of the start time and then delete the job.



You can then recreate it using these instructions:


  1. Navigate to Setup > Build > Develop > Apex Classes and press ‘Schedule Apex’ button

  2. A screen will be displayed enabling you to establish the run criteria

  3. Enter a Job Name ‘Asperato Repeat Payment’ (recommended value)

  4. Next to the Apex Class box press the magnifying glass icon and in the list that displays select ‘BatchProcessPaymentSchedules’

  5. In the'Schedule Apex Execution' section set the Frequency to ‘Weekly’ and tick all the boxes under 'Recurs every week on'

  6. Select a Start date (defaults to today)

  7. Set an End date. The default is in one month and you should change this to a value a long time in the future such as 31/12/2050

  8. Set the Preferred Start Time to a value, a suggestion would be 04:00 or 05:00

  9. Save this record and that will schedule the task