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
kumar_arunkumar_arun 

How to know sObject last usages Date

Hi Everyone, I have a requirement like this- Need to count sObject in org, which is used (LastModified)  3 months before, Can we do that using Apex, I need for All sObject. Please suggest me some way so that I can achieve this.
Anurag SaxenaAnurag Saxena

Hi Arun,

Please try this

global class count {

map<String, Schema.SObjectType> GlobalMap = Schema.getGlobalDescribe(); 
global count(){
    

for (Schema.SObjectType Obj : GlobalMap.values()) {
    Schema.DescribeSObjectResult ObjDesc = Obj.getDescribe();
    system.debug('Object Name: ' + ObjDesc.getName());
}

System.debug(GlobalMap.size() );
}
}
let me know what happens?

Thanks:)