function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TehNrdTehNrd 

AsyncApexJob not queryable in InstallScript

We have a managed packaged that has an install script. Sometime within the last week queries agains the AsyncApexJob inside the install script started throwing the following error:

System.QueryException
sObject type 'AsyncApexJob' is not supported.

I guarantee this used to work. Anyone from salesforce know of a change that could have broken this?
Best Answer chosen by TehNrd
TehNrdTehNrd
Ya....so even though none of the methods in the stack track were modified the class had the 'with sharing' keyword added to it. This needs to be removed to access AsyncApexJob in a post install script.