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
RupaliJRupaliJ 

Access to custom setting denied occassionally through batch apex

Hi,

 

We have a batch class which executes every hour. We are accessing a list type custom setting within this batch class. Sometimes when this class executes it fails due to the error which states "First error: Access to entity 'custom_setting__c' denied" and sometimes this class executes successfully without any error.

 

Can you please explain, what can be the reason for this?

 

Thanks,

Rupali

Ashish_SFDCAshish_SFDC
Hi Rupali,


This is a known issue, Please add yourself to the "This issue effects me" button and see the page for updates on the resolution.

Managed package batch class cannot access protected custom setting from execute method in installer orgs

https://success.salesforce.com/issues_view?id=a1p30000000SwDzAAK


Regards,
Ashish