AgileApps Support Wiki Pre Release

Difference between revisions of "GetGlobalPicklist"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
 
Line 25: Line 25:
   for (EnumerationItemBean e : items )
   for (EnumerationItemBean e : items )
   {
   {
     Functions.debug("Label : " + e.getPicklistLabel() + " Value : " + e.getPicklistValue());
     Logger.info("Label : " + e.getPicklistLabel()  
              + " Value : " + e.getPicklistValue(), "Global Picklist");
   }
   }
}
}

Latest revision as of 01:16, 10 September 2013

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

Syntax
<syntaxhighlight lang="java" enclose="div">
 GlobalPicklistBean getGlobalPicklist(String id) throws Exception

</syntaxhighlight>

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.
<syntaxhighlight lang="java" enclose="div">

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

 ...

} </syntaxhighlight>