• Bala 1585
  • NEWBIE
  • 0 Points
  • Member since 2015

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

I need help on the following requirement as follows


1) i am trying to prepare an excel sheet with all the org limits details as follows

i have written an vf page and an apex code which will extract the object name with the limits corresponding to it

similary i am trying to figure how to get the other details

Item               Usage      Limit  % used
Custom Fields 19           800     2%  
Custom Relationship Fields 2 50 4%  
Active Workflow Rules 1 100 1%  
Total Workflow Rules 1 500 0%  
Approval Processes 0 500 0%  
Active Lookup Filters 0 10 0%  
Active Validation Rules 0 500 0%  
VLOOKUP Functions 0 10 0%  
Sharing Rules (Both Owner- and Criteria-based) 0 300 0%  
Sharing Rules (Criteria-based Only) 0 200 0%  



i want to get the details of others highlighted in bold

Kindly help me how to get thse info pls
 
MY APEX CODE :

public class ObjectListController {
    public String val {get;set;} 
    public List<SelectOption> getName() 
    { 
        
        List<Schema.SObjectType> gd = Schema.getGlobalDescribe().Values();      
       
        List<SelectOption> options = new List<SelectOption>(); 
        for(Schema.SObjectType f : gd) 
        { 
            
            options.add(new SelectOption(f.getDescribe().getLabel(),f.getDescribe().getLabel())); 
            
        } 
        return options; 
        
    } 
    public List<String> getObName() 
    { 
        List<Schema.SObjectType> gd = Schema.getGlobalDescribe().Values();      
        List<string> options = new List<string>(); 
        for(Schema.SObjectType f : gd) 
        { 
            
           	string ObjectName = f.getDescribe().getLabel();
            system.debug('ObjectName==>'+ObjectName);
             integer FieldCount = f.getDescribe().fields.getMap().size();
			system.debug('FieldCount==>'+FieldCount);
			
            options.add(f.getDescribe().getLabel() +' ; '+ f.getDescribe().fields.getMap().size()); 
            
          
        } 
        System.debug('wewetwet'+options);
        return options; 
        
    } 
 
}
MY VF CODE :

<apex:page controller="ObjectListController" readOnly="true" > 
    <apex:form >
        <apex:pageBlock >
        <apex:pageBlockTable value="{!obName}" var="o">
            <apex:column value="{!o}"/>
        </apex:pageBlockTable> 
        <apex:SelectList value="{!val}" size="1"> 
            <apex:selectOptions value="{!Name}"></apex:selectOptions> 
        </apex:SelectList> 
            </apex:pageBlock>
    </apex:form> 
</apex:page>


Kindly help me pls

Thanks in Advance