+ Start a Discussion
craigmhcraigmh 

Multi-currency App Interest?

I currently have a utility that works on converting currency amounts efficiently.

 

I built this to deal with the aggregates issue:

"If a query includes aGROUP BYorHAVINGclause, any currency data returned by using an aggregate function, such asSUM()orMAX(), is in the organization's default currency. You cannot convert the result of an aggregate function into the user's currency by calling theconvertCurrency()function."

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm

 

I have a VisualForce page where Account is the standard controller, and I'm doing a sum of custom object records. Since the Organization is multi-currency, the non-org default Accounts show the sums in the org default currency. I built an Apex class to deal with this and other minor currency-related issues, and thought it might be generally useful.

 

Is there enough interest for me to put this up on AppExchange?

MissouriAdminMissouriAdmin
The bigger issue is that the values returned are INteger.  It is straight forward enough to get the CurrencyTable and provide the reverse conversions.  The larger problem is that the Aggregate only shows Integer, loosing the decimal precision.  SO when you convert back, the value can be Different.  The larger the Exchange rate, the larger the variance.

THIS Integer problem I need corrected.