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
MiddhaMiddha 

Custom Settings with Schedulable class

Hi All,

 

I am using custom settings in a class which is working fine if i call that method on click of a button. But when i schedule the same method, custom settings throws null pointer exception.

 

Can anyone give some pointer to this issue?

 

Thanks in advance.

EnthEnth

Is your custom setting Hierarchical, and if so have you set values for the Org level? Otherwise when the Scheduled Apex runs, would there be valid values for the user context it runs in ?

 

MiddhaMiddha

Hi Enth,

 

Its "List" and "Protected". So i dont see the user context and role hirarchy as an issue.

 

Thanks.