Get current exchange rates

Sergio Gadelha
Tera Contributor

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!