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
Yongduck JinYongduck Jin 

Can I make a custom global variable and store the result of SOQL query?

Hi my friends, 

I am trying to store more than 60,000 record from Batch apex result, and I have to edit the record with schedulable apex every 5 mins. 


So, 
Can I store this data in a global variable? I googled it, but all I can find was for Normal global variable. 

Would you be able to direct me to the link or show me a simple code line please? 


Thank you :)

 

Max H. GoldfarbMax H. Goldfarb
Yeah I have done this to share across Batch classes. I was pulling a ton of data (not quite 60,000 records but close to it for sure) from the tooling api, portraying it on a visualforce page, and not storing it in a Salesforce object so I also had to create a class to store the data and it looked something along these lines: 
public class fieldDependency {
        public String componentName {get; set;}
        public String componentType {get; set;}
        public String fieldName {get; set;}
        public String componentId {get; set;}
    }
public List<fieldDependency> fdList {get;set;}
osacar sotoosacar soto