Skip to main content

Data Archival

Explore practical guides and implementation patterns for this topic.

Posts

Data 360

Salesforce Basics: Big Objects & Data Archival

💬 In plain words: Big Objects are a cheap warehouse shelf for billions of old rows: fast to store. But no triggers, no flows, no standard reports, and limited queries. They are an ARCHIVE , not a working table — move cold data there and keep the hot data lean. 📌 Example: 7 years × 50M banking transactions can't live on a custom object. Keep 18 months hot, and let a nightly batch move older rows to Transaction_Archive__b (Big Object). The audit team queries the archive by AccountId + date via a custom LWC. 🎬 Real-Life Example: 40 Million Scans and a Dying Report Every parcel gets scanned at pickup, hub, van, and door. That is 40 million Scan__c rows a year. The Old/Bad Way: Keep every scan in the normal custom object forever. Storage costs climb. List views time out. Reports crawl. Every SOQL filter fights an ocean of dead rows. Why this is bad: Normal objects are built for records people work on today. Th...
Read article
Topic Batch Apex Best Practices Bulk Deletion Custom Metadata Types Data Archival Dynamic SOQL Salesforce Development
Batch Apex Best Practices Bulk Deletion Custom Metadata Types Data Archival Dynamic SOQL Salesforce Development

Metadata-Driven Record Deletion in Salesforce: Scalable Batch Apex Guide

In plain words: A Metadata-Driven Deletion Batch is a reusable Batch Apex job that purges outdated records based on configuration rules stored in Custom Metadata Types (CMDT) . Instead of editing and deploying code whenever you need to clean up an object, administrators simply update metadata fields (such as target object name, date range, or active status), and the batch automatically executes the correct SOQL query. Maintaining data hygiene and keeping storage consumption within platform limits often requires automated record cleanup. However, hardcoding object names, date filters, or WHERE clauses directly inside Apex classes creates ongoing maintenance debt. Every requirement change forces developers to edit code, write new unit tests, and coordinate production deployments. Coupling Batch Apex with Custom Metadata Types creates a declarative engine that lets teams manage data retention policies without touching code.
Read article