Thursday, May 8, 2014

Key Flex field kff in oaf pages

write a method like this in the Controller of the page where you have key flex field
and call that in the Process request
where Budget is the id of my kff item use your kff item id in that place
and the value of code combination id will store in ToAccountId
u cant give in ViewAttribute at page level only through coding only you can set
  
protected void prepareChargeAccountFlex(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
      {
 OAKeyFlexBean HdrAcc = (OAKeyFlexBean)paramOAWebBean.findIndexedChildRecursive("Budget");
        HdrAcc.setCCIDAttributeName("ToAccountId");
        HdrAcc.setStructureCode("XX_KFF_NAME");
        HdrAcc.setDynamicInsertion(true);
      }