092_Schema获取表字段的方式

Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get('ObjectName').getDescribe().fields.getMap();
List<String> fieldList = new List<String>();

for(string s:objectFields.keySet()){
fieldList.add(s);
}

System.debug('************:'+fieldList);

System.debug( '&&&&&:'+String.join( fieldList, ', ') );

posted @ 2020-03-14 11:56  BandariFang  阅读(280)  评论(0编辑  收藏  举报