PC : Add Drop-down values through peoplecode



Add Drop-down values through peoplecode

/* Get the field reference into &field variable */

&field = GetRecord(Record.CH_EMPTYPE).GetField(Field.CH_EMPMAIN);

/* Delete all the values from dropdown list */
&field.cleardropdownlist();

/* Add values to the dropdown list */
&field.adddropdownitem(Descr, Value);
   [Value]: It is actual value which is mapped to the dropdown item
   [Descr]: It is actual text which is visible as a dropdown item
Examples:
&field.adddropdownitem("A", "A");
&field.adddropdownitem("B", "B");
&field.adddropdownitem("C", "C");

Comments

Popular posts from this blog

BI Publisher: If Condition with sub-string in rtf template