Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Integer count = 0;
- map<String, Schema.SObjectType> GlobalMap = Schema.getGlobalDescribe();
- {
- for (Schema.SObjectType Obj : GlobalMap.values()) {
- Schema.DescribeSObjectResult ObjDesc = Obj.getDescribe();
- if(ObjDesc.iscustom()){
- count ++;
- system.debug('Object Name: ' + ObjDesc.getName());
- }
- }
- System.debug('Custom Object '+ count );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement