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
icejohn2508icejohn2508 

How do I write an APEX Batch(?)Class to delete records that are uploaded via the API that do not meet a specific criteria? I am new to APEX coding and any advice on where to start would be great.

Hargobind_SinghHargobind_Singh
Hi, Instead, can you look at stopping those records to be inserted at the first place, by using validation rules or if your validation is complex, you can also use triggers ? Would save you the complexity of creating and executing deletion batches.