Return to Snippet

Revision: 21449
at December 13, 2009 12:08 by cavi21


Initial Code
Map<String,Schema.SObjectField> mapaCampos = Schema.SObjectType.sObjectACAMBIAR.fields.getMap(); 
List<String> listaCampos = new List<String>(); 
for(String campo : mapaCampos.keyset()){
	listaCampos.add(mapaCampos.get(campo).getDescribe().getName());
}
listaCampos.sort();
String stringADevolver = '';
for(String item : listaCampos){
	if(item != 'TotalPrice'){
		if(stringADevolver.length() > 1)
			stringADevolver += ',';
		stringADevolver += '' + item + '';
	}
}
system.debug(stringADevolver);

Initial URL

                                

Initial Description

                                

Initial Title
Campos de un sObject en Salesforce

Initial Tags
textmate

Initial Language
Other