Answers for "how to i count objects available in salesforce organization"

0

how to i count objects available in salesforce organization

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 );
Posted by: Guest on January-20-2021
0

how to i count objects available in salesforce organization

map<String, Schema.SObjectType> GlobalMap = Schema.getGlobalDescribe(); 
for (Schema.SObjectType Obj : GlobalMap.values()) {
    Schema.DescribeSObjectResult ObjDesc = Obj.getDescribe();
    system.debug('Object Name: ' + ObjDesc.getName());
}
System.debug(GlobalMap.size() );
Posted by: Guest on January-20-2021

Code answers related to "how to i count objects available in salesforce organization"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language