I have a Standard Object "Opportunity" I want to access a custom-setting with multiple currency

I have multi-currency enabled in my org.

Generally a custom setting can be accessed like follows

Using Hierarchy :

Custom_Setting_Name__c mysetting = Custom_Setting_Name__c.getInstance(); 

Using List :

CustomSettingName__c mySetting = CustomSettingName.getValues('SomeValue');



I would like to know if we can access the multi-currency values ( Type : Picklist ) the same way as above or is there a special way of handling multi-currency in force.com.

Any head-up will be much appreciated.


You only need to define the currency iso code on your account records. Then once you create a new opportunity for a particular account, it will default the currency automatically from your account.

To define the currency automatically on the account. I would create a custom setting list with the country as the Name and a text field for the IsoCode. Then with a trigger before insert, set the CurrencyIsoCode based on the custom setting.

account.CurrencyIsoCode = CountryCurrency__c.get(account.BillingCountry).CurrencyIsoCode__c;
  • No.. I am trying to default a value of currency on opportunity object based on the account location. Lets say if he is from France, then the default currency should be EURO and lets say if not then it should be USD. I have the Currency values in a custom setting. Please let me know if this is possible coz i hear there are a lot of probs with multi-currency enabled orgs. – StormBr34ker Mar 27 '15 at 19:54
  • update my answer – Cloud Ninja Mar 29 '15 at 22:35
  • Sorry upvote requires 15+ reputation. Which I dont have yet. Once i get it i'l make sure to upvote you. Thanks – StormBr34ker Mar 31 '15 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.