You need to sign in to do that
Don't have an account?
Alex Miller 93
Get all Objects Names
I'm trying to write a program to pull in all the objects our admins regularly modify. These don't include system objects such as Approvals and Opportunitycontactrole. The list I'm wanting to pull is the one you find by going to Setup->Create->Objects.
I have this code. The problem with this code takes too long to iterate. I keep getting a CPU timeout error in the Dev console. I noticed it is pulling things like Approvals. I'm only interested in the custom object screen plus standard objects like Accounts, Contacts, Opportunities, and so on. Not the System Standard objects.
I have this code. The problem with this code takes too long to iterate. I keep getting a CPU timeout error in the Dev console. I noticed it is pulling things like Approvals. I'm only interested in the custom object screen plus standard objects like Accounts, Contacts, Opportunities, and so on. Not the System Standard objects.
for(Schema.SObjectType objTyp : Schema.getGlobalDescribe().Values()){ system.debug('****-->'+ objTyp.getDescribe().getLabel()); }Anyone know how to pull that without generating a manual custom setting list?
Greetings to you!
You can get the list from the following SOQL:
Also, you can use below code:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
You can able to do it by using REST APi and Apex schema namespace
REst API
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_describeGlobal.htm
Refer this links
https://jungleeforce.wordpress.com/2013/06/07/extracting-list-of-all-the-objects-standard-custom-in-salesforce/
https://salesforce.stackexchange.com/questions/48920/dynamic-picklists-of-objects-its-fields/48936#48936
https://salesforce.stackexchange.com/questions/100668/retrieve-api-names-of-all-object-in-salesforce-org-using-soql
https://developer.secure.force.com/cookbook/recipe/retrieve-a-list-of-objects-using-apex
http://www.infallibletechie.com/2015/08/how-to-get-all-field-names-in-all.html
Try this.
SELECT Label, QualifiedApiName FROM EntityDefinition