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
AmeyBAmeyB 

Snapshot of all records each month and ability to report on the same

Hi,

We have a custom object, records are created and updated on daily basis. The object currently has approximately 45,000 records and will kepp on increasing.
Below is our requirement:
1] Take a snapshot of all these records on day 1 of the month and store it (as same custom object records, or as new custom object records, or as CSV, to external system etc.).
2] Similarly take the snapshots for every month.
3] There should be provision to view any of the snapshot and report on the same.

What will be the better approach for the same?
GauravGargGauravGarg

Hi Amey,

To snapshot records' on 1st of every month, i.e. we need to access those record values also. So as per my understanding below are the possible scenario's:
1. Store record's in custom object, will unneccesarily duplicate records in system. 
2. External System: we need to integrate the system, also need to maintain it. 
3. CSV: by far this is the best approach, also we can create a custom attachment to store CSV file in system for every month. 

Below is the link where CSV file has been generated and emailed.
http://www.salesforcetutorial.com/how-to-export-data-in-csv-by-using-apex-code/

Hope this helps!!!

Thanks,

Gaurav
Skype: gaurav62990