Posted By

cavi21 on 12/13/09


Tagged

textmate fields salesforce


Versions (?)

Campos de un sObject en Salesforce


 / Published in: Other
 

  1. Map<String,Schema.SObjectField> mapaCampos = Schema.SObjectType.sObjectACAMBIAR.fields.getMap();
  2. List<String> listaCampos = new List<String>();
  3. for(String campo : mapaCampos.keyset()){
  4. listaCampos.add(mapaCampos.get(campo).getDescribe().getName());
  5. }
  6. listaCampos.sort();
  7. String stringADevolver = '';
  8. for(String item : listaCampos){
  9. if(item != 'TotalPrice'){
  10. if(stringADevolver.length() > 1)
  11. stringADevolver += ',';
  12. stringADevolver += '' + item + '';
  13. }
  14. }
  15. system.debug(stringADevolver);
  16.  

Report this snippet  

You need to login to post a comment.