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
ram123ram123 

Batch Process/Query Locator - Scope & Visibility

Hi,

 

 Let assume my batch process which crunching some contract line items  when i schedule it.  Will it also able to pick up the new records which I created after I scheduled the batch process ? Assume the query criteria matches.

 

Thanks

Ram

 

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

It will pick up items that are committed to the database at the time the query is executed, which is when the batch process has a status of "Starting". Any items created while the status is "Processing" will not be seen, as the transaction is ACID. They will be seen the next time the batch process runs. So, to answer your question fully, items created while the batch process is scheduled (has not yet started running) will be detected when the batch executes.

All Answers

sfdcfoxsfdcfox

It will pick up items that are committed to the database at the time the query is executed, which is when the batch process has a status of "Starting". Any items created while the status is "Processing" will not be seen, as the transaction is ACID. They will be seen the next time the batch process runs. So, to answer your question fully, items created while the batch process is scheduled (has not yet started running) will be detected when the batch executes.

This was selected as the best answer
ram123ram123

Thanks !