- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 07:28 AM
Hi, I'm using the script below to get total cost of a event, considering the system default currency (USD), but the exchange rates aren't updated.
How can I get this rates updated?
var totalCost = Class.create();
totalCost.prototype = {
initialize: function(mrkevent) {
this.mrkevent = mrkevent;
},
getCost: function() {
var cost = 0;
//Get the total cost of all equipment for this event
var equipment = new GlideRecord('x_73586_marketing_equipment_request');
equipment.addQuery('marketing_event', this.mrkevent);
equipment.query();
while(equipment.next()){
cost = cost + parseFloat(equipment.cost.getSessionValue());
}
return cost;
},
type: 'totalCost'
};
Thanks!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding