getGlobalPicklist

From AgileApps Support Wiki
Revision as of 01:16, 10 September 2013 by imported>Aeric
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Retrieve details of a Global Picklist and it's Enumerated values.

Syntax
  GlobalPicklistBean getGlobalPicklist(String id) throws Exception
Parameters
id
The global picklist identifier
Returns
com.platform.beans.GlobalPicklistBean containing the global picklist specification
Throws
Exception
Example
This example lists the enumeration values for a global picklist.
try {
  String id = "wer567uty789";
  GlobalPicklistBean bean = Functions.getGlobalPicklist("wer567uty789");
  String title = bean.getTitle();
  List<EnumerationItemBean> items = bean.getEnumerationItems();
  for (EnumerationItemBean e : items )
  {
     Logger.info("Label : " + e.getPicklistLabel() 
              + " Value : " + e.getPicklistValue(), "Global Picklist");
  }
}
catch (Exception e) {
  ...
}