Created
September 8, 2014 19:50
-
-
Save cam8001/1d8006baeed122b96711 to your computer and use it in GitHub Desktop.
Sum a bundle in SFDC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sum = 0; | |
| // Get Bundle 2. | |
| var bundle = jQuery('.editPage .pbBody').children('div')[1]; | |
| jQuery('td[id*=j_id292]', bundle).each(function(index, value){ | |
| line_item_cost = value.innerHTML; | |
| line_item_cost = +line_item_cost.replace(/[^\d\.-]/g,''); | |
| sum = sum + parseFloat(line_item_cost); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment