Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Calculate total amount of a column in a subgrid after Rollup 12

$
0
0

Hi

We have used the following javascript to calculate the total from a column in a subgrid and put the value in another field. 

function CostoTotal(){

var gridControl = document.getElementById('opportunityproductsGrid').control;
var ids = gridControl.get_allRecordIds();
var sum = 0.00;
for(i = 0; i < ids.length; i++) {
var cellValue = gridControl.getCellValue('new_costo', ids[i]);
cellValue = cellValue.replace( /,/,"." );
var sum = sum + parseFloat(cellValue);
}
Xrm.Page.getAttribute('new_costototal').setValue(sum);
}

However the code dont work after updating to rollup 12. 

Anyone know if its possible to this in another way that works after R12? 

thanks. 


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>