Honored Contributor
Re: Error updating Financial Summary: Missing required element

I tried to execute your code and the problem is with this statement.

fs.setForecastActual(fs.getForecastActual());

fs.getForecastActual() is not able to properly return the ForecastActualInfo  object.

 

But when I tried the approached that HP has used in the demo code i.e. create a Super Class that handles the Actuals Object updated and then return it ForecastActualInfo object.

 

Instead of creating super class, just try to modify the ForecastActualInfo object and then try to set it.

 

ForecastActualInfo forecastActual = fs.getForecastActual();
ForecastActualInfo.Lines faLines = forecastActual.getLines();
 for (int i = 0; i < faLines.getLineArray().length; i++) {
            
            ForecastActualInfo.Lines.Line.Cells faCells = faLines.getLineArray(i).getCells();
            if (!isEmpty(faCells)) {
                for (int j = 0; j < faCells.getCellArray().length; j++) {
                    FinancialLineCellInfo faCell = faCells.getCellArray(j);
                    
                    if (faCell != null && faCell.getActualValueLCL() != null) {
                        faCell.setActualValueLCL(faCell.getActualValueLCL().multiply(new BigDecimal(1.10)));
                    }
                }
            }
        }
fs.setForecastActual(forecastActual);

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)