Hi all,
i have the following request. Within the opportunity entity we have a field with the estimated value and a subgrid with all child records which have estimated values as well. Now i created a field which should display the sum all estimated values of the child records which can be found within the subgrid.
I tried this but it didnt work:
function calcsum() { var grid = document.getElementById(‘opportunity_bundle’); //Subgrid name var ids = grid.control.get_allRecordIds(); var sum = 0.00; var cellValue; for(i = 0; i < ids.length; i++) { var cellValue = grid.control.getCellValue(‘estimatedvalue’,ids[i]); //estimatedvalue is the field within the subgrid var number = Number(cellValue.replace(/[^0-9\.]+/g,””)); sum = sum + number; } alert(sum); }
any suggestions?
*This post is locked for comments