+ Start a Discussion

How to get the Createddate, lastmodified date & description for the list of Sobjecttype.?

I have a list of Sobjects and I want to get the Createddate, lastmodified date & description of each Sobject using Apex. Also if I can check if that Sobject was created as part of Managed package or not. Kindly advise. 

Thanks a lot in advance. 
AbhishekAbhishek (Salesforce Developers) 
Hi Navinku,

Try the code as mentioned the below blog,


And I can see an Idea is already raised similar to it,


I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Hi Abhishek, 
thanks for the quick response. I got some useful information from the first link you shared. 
But not sure how i can use the below query in apex class to get the system fields. Currently I have an apex class which gets the Label, QualifiedApi name etc from EntityDefinition but not the system fields like Createddate, Created by, Last modifiedDate & Lastmodified by. 

QueryResult queryResult = toolingConnection.query("select Id, DeveloperName, LastModifiedDate from CustomObject");

How can i use this in my apex class  to get system fields?