• Jabaraj
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
here is my code...

public class objectlist {
    //Do not forget to get instance in constructor for this list
    //String type='Account';
     Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
       List<string> fieldLable = new List<string>();
        
       Map <String, Schema.SObjectField> fieldMap = gd.get('Account').getDescribe().fields.getMap();
       for(Schema.SObjectField fieldAPI : fieldMap.values())
       {
               fieldLable.add(+ '<' +fieldAPI.getDescribe().getName()+ '/>' );
       }
       
       system.debug('fieldLable-----'+fieldLable);
}

IDK what part is wrong...pls help me fix this...THX!!!