function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
marctmarct 

Foreign currency conversion formula

Does anyone know how I can write a formula to pull updated currency conversion data for the calculation and where I might get this data from?
MissouriAdminMissouriAdmin
I am looking for the same thing.  I am setting up Triggers to do some calculations between Objects and I need to be able to convert between ALL the currencies that our data is being entered.
 
HELP.
MissouriAdminMissouriAdmin

Ditto, this is really becoming a pain.  I found the convertCurrency( Amount ) SOQL statement, but that just converts it from whatever it is, to the currency of the person using it.  When you run it in APEX or a trigger, you use a generic user, so all conversion take place to a single currency, not necessarily the one you want.

THERE HAS TO BE A SOLUTION PROVIDED FOR THIS.  APEX and S-Controls for currencies is USELESS without this.

JJE_OLDJJE_OLD

Hi,

 

You could try to query the CurrencyType object which contains the conversion rates (In Multi Currency).

The following will give you the conversion rate between your company default currency and the ISO Code contained in the string sISO ('USD' for example)

Double conversionRate = [SELECT conversionrate FROM currencytype WHERE isocode =: sISO LIMIT 1].conversionRate;

Then you'll have to multiply the Amount to convert by the conversion rate to obtain the converted amount.

 

Regards,