/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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);