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
Jos Vervoorn 2Jos Vervoorn 2 

What is wrong with the query .... within the batch querylocator

I'm running a scheduled batch but I like to clean up the rows from previous runs during the day. So from the schedule, I call the batch with the JobId as a string parameter. So far good. But then I need to select all rows not having the jobId__c with the same value (parameter) and it does not work. It affects all rows and not only the ones with the JobId having the same value as the parameter.
Best Answer chosen by Jos Vervoorn 2
Jos Vervoorn 2Jos Vervoorn 2
Solved by using BatchId

All Answers

Anant KamatAnant Kamat
Can you provide the query so that it would be easy to identify the issue.
Jos Vervoorn 2Jos Vervoorn 2
Solved by using BatchId
This was selected as the best answer