1 Reply Latest reply on Jan 19, 2013 11:36 PM by 985924

    KFF issue while extending standard page controller

      Business Requirement: In Purchasing SuperUser Responsibility > Buyer Work Center > Orders Page

      In Orders page, When at distribution level need to perform some validation.
      And for that would need 'PO Charge Account' value which is a Key Flex Field.

      For addressing this requirement, i am extending OrderCO Standard controller
      and upon click on 'Save/Approval/Submit' buttons writing custom validation logic in

      Now i am facing below issues:
      Issue1: Only when navigated to 'Distribution Region' tab, able to see distributions data in PoDistributionsMergeVO.

      Issue2: When navigated to Distributions Region tab and click on save,
      I am able to get KFF data using below code

      OAAdvancedTableBean oaadvancedtablebean = (OAAdvancedTableBean)webBean.findChildRecursive("DistributionsTableRN");
      OAViewObject distVO = (OAViewObject)am.findViewObject(oaadvancedtablebean.getViewUsageName());

      if (distVO != null)
      for (int i = 0; i < distVO.getFetchedRowCount(); i++)
      PoDistributionsMergeVORowImpl distRowImpl = (PoDistributionsMergeVORowImpl)distVO.getRowAtRangeIndex(i);

           if (distRowImpl.getShipmentNum() != null)
      shipmentNum = distRowImpl.getShipmentNum().toString();
      OAKeyFlexBean oaKFF = (OAKeyFlexBean)oaadvancedtablebean.findChildRecursive("PoChargeAccount");
      KeyFlexfield keyflexfield = (KeyFlexfield)oaKFF.getAttributeValue(OAWebBeanConstants.FLEXFIELD_REFERENCE);
           segment3 = keyflexfield.getSegment(2).getInputValue();

      But when i go to PO Charge account and change distribution account segment values, then also
      'keyflexfield.getSegment(2).getInputValue()' is giving old value. I am not getting value which is being displayed or new value.

      Any one ..any clues / hints.. how to proceed on KFF Please help..