AgileApps Support Wiki Pre Release

getGlobalPicklist

From AgileApps Support Wiki

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) {
  ...
}