You need to sign in to do that
Don't have an account?
Chandu007
How to get all custom objects API names, Label, count of records and Last modified date
Hi,
In my org we have around 500 custom objects and they have some records(data). now my requirement is to get all those custom objects API names, record count of each object and last modified date of each record in object. to get record count of each object i am using (select count() from custom object name) 500 times. So, can i get this in a single shot into vf page or excel using query or Apex code? any suggestions?
In my org we have around 500 custom objects and they have some records(data). now my requirement is to get all those custom objects API names, record count of each object and last modified date of each record in object. to get record count of each object i am using (select count() from custom object name) 500 times. So, can i get this in a single shot into vf page or excel using query or Apex code? any suggestions?
You can use Schema.getGlobalDescribe() to get all properties of sobject .
Please refer below links which have sample code that may help you.
https://jungleeforce.wordpress.com/2013/06/07/extracting-list-of-all-the-objects-standard-custom-in-salesforce/
http://salesforce.stackexchange.com/questions/48920/dynamic-picklists-of-objects-its-fields/48936#48936
http://salesforce.stackexchange.com/questions/100668/retrieve-api-names-of-all-object-in-salesforce-org-using-soql
Hope this helps you!
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards
Sandhya
All Answers
You can use Schema.getGlobalDescribe() to get all properties of sobject .
Please refer below links which have sample code that may help you.
https://jungleeforce.wordpress.com/2013/06/07/extracting-list-of-all-the-objects-standard-custom-in-salesforce/
http://salesforce.stackexchange.com/questions/48920/dynamic-picklists-of-objects-its-fields/48936#48936
http://salesforce.stackexchange.com/questions/100668/retrieve-api-names-of-all-object-in-salesforce-org-using-soql
Hope this helps you!
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards
Sandhya
There is a much simpler solution from Rakesh here (extract Custom Object List):
https://automationchampion.com/2022/03/31/easiest-way-to-find-newly-created-objects-and-fields-in-salesforce/
I used:
SELECT DeveloperName, SharingModel, CreatedBy.Name, CreatedDate
FROM CustomObject
WHERE CreatedDate= LAST_N_DAYS:365
order by CreatedDate DESC