• Clay Tomerlin 1
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

Custom Objects (Unlimited Edition)  - 2,000
Note from Salesforce - (The custom objects contained in a managed package publicly posted on the AppExchange don't count against the limits for your Salesforce Edition).
//It will get list of all custom objects.
Map <String, Schema.SObjectType> allObjects = Schema.getGlobalDescribe();                
Map<String, Schema.DescribeSObjectResult> allObjectsNames = new Map<String, Schema.DescribeSObjectResult>();       
for(Schema.SObjectType objType : allObjects.values())        
{
                        Schema.DescribeSObjectResult objectResult = objType.getDescribe();                                    	        
                           if(objectResult.isCustom() && !objectResult.isCustomSetting() && !objectResult.getName().endsWith('__c_hd'))
	            {
                                allObjectsNames.put(objectResult.getName(), objectResult); 
	            }
}

I am writing the above code for getting all custom objects.

It is getting all custom objects including managed package objects. How can I avoid(filter) managed package objects.

I didn't get any reply from Apex Code Development, so again I raised this post in VF Development.
Can you please help any one.

Thanks
Venkat.
  • October 29, 2014
  • Like
  • 0