function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
InfopiaInfopia 

Query Case Types?

What is the best way to query all of the Case Types? Thanks, Jon
InfopiaInfopia
Nevermind, figured it out. For those who are interested, here is my source:

Code:
        for (int j = 0; j < describeSObjectResults.length; j++) {
          Field[] fields = describeSObjectResults[j].getFields();
          for (int i = 0; fields != null && i < fields.length; i++) {
            if("Type".equals(fields[i].getName())) {
                PicklistEntry[] pl = fields[i].getPicklistValues();
                for(int k=0; pl!=null && k<pl.length; k++) {
                    System.out.println("PicklistValue="+pl[k].getValue());
                }
            }
          }
        }