Object usage report in Salesforce - get record count, last record created/modified/viewed date

5:55 PM

 STEP 1:

Create a batch apex class 

*******

 

STEP 2:

Execute the batch class from developer console -> execute anonymous apex

 

// Dynamically exclude objects that might time out
Set<String> exclude = new Set<String>{'CombinedAttachment', 'CollaborationGroupRecord'};

ObjectMetadataReportBatch job = new ObjectMetadataReportBatch(exclude);
// We use scope size 1 to maximize the 10-second timeout limit per object
Database.executeBatch(job, 1); 

 

STEP 3:

Go to Files and look for the generated file , the file will look like this

 

0 comments