You need to sign in to do that
Don't have an account?
ministe2003
Accessing Converted amount currency
Hi,
If an opportunity is not in the organisation's default currency, the amount is displayed in it's local currency and in the org's default in brackets next to it.
eg
How can I access this converted amount? I'm writing a custom big deal alert email and want the value in the subject to be in GBP regardless of the opportunty's currency.
Thanks!
Steven
There are a few ways you can do this, depending on your particuar use case.
One way is to use the convertCurrency function directly in your SOQL query
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm
This will return the value of the currency field in the running users default currency. In your case, if your default is GBP, then that is what would get returned.
The other way, is to do the conversion yourself, by referencing the currencytype object, and converting the value manually.
Cheers, knew about the SOQL method but not the currencytype object. I'm using a trigger so trying to keep SOQL calls down so now buy using that object I can pull all conversion rates in 1 query. Was hoping to be able to do it without using queries at all, but didn't think it'd be possible.
Thanks!