+ Start a Discussion
AshlekhAshlekh 

SOQL for Multi Currency

Hi All,

I want to found some record in my ORG.

Actually in my org Multi Currency is enabled. Default currencty is USD for ORG. On my user or for me default currency is GBP.

So when every I see the price or cost of on Account, it is populating in GBP.

I want to write a query to fetch only those records whose value is greater than 200 USD.

Please let me know the query.

-Thanks
Ashlekh Gera
Best Answer chosen by Ashlekh
James LoghryJames Loghry
Ashlekh,

Please see the following documentation:  https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_querying_currency_fields.htm

In general, you would need SOQL similar to the following:
 
Select convertCurrency(Your_Currency_Field__c) From Your_Object__c Where Your_Currency_Field__c > USD200

 

All Answers

James LoghryJames Loghry
Ashlekh,

Please see the following documentation:  https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_querying_currency_fields.htm

In general, you would need SOQL similar to the following:
 
Select convertCurrency(Your_Currency_Field__c) From Your_Object__c Where Your_Currency_Field__c > USD200

 
This was selected as the best answer
AshlekhAshlekh
Hi James,

Thanks for your reply. And yes I've found that but thaks for your reply.

-Thanks
Ashlekh Gera