Hi I am facing the below issue, please help me


I had set the trigger, when opportunity stage is Closed Won automatically contract is created.

Once contract will create the Total 1 , Total 2, Total 3 data will passed from Opportunity to contract

eg : if in opportunity Total 1 = 10 , total 2 = 20 and total 3 = 30..

The same value will store into the Contract which is created behalf of that opportunity.

Now my problem is that, in my org we are using different currency (USD, EUR, AUD and soo on)

If the Total 1 , 2 , 3 in opportunity is in EUR format. The same format value will pass into the contract Total 1, 2 3.

But by default i am getting USD currency.

2 Answers 2


I Agree with crmprogdev. If you want to have same currency in Opportunity and Contract then while creating Contract from Opportunity, you have to copy currency from Opportunity. For e.g. If(trigger.IsUpdate){

Contract contr=new Contract(Name='Test Contract From Oppty', StartDate='09/12/2014', Status='Draft', CurrencyISOCode='Eur'); Insert Contr; }


Currency, the display of currency and conversion between them is a complex subject. I recommend you take a look at Implications of Enabling Multiple Currencies. USD would appear to be your corporation's primary currency. What's displayed to your users could vary. They may see USD, the currency that's based on the User's locale settings, both, or all currencies used in the org.

How currency is converted to Org's primary currency (used for forecasting of Opportunities among other things) can vary depending on whether Dated Exchange Rates are enabled. See About Advanced Currency Management for more on the subject.

If you're going to handle different currencies in your triggers, I think you'll want to collect ISO codes for the currencies involved when you do. While you could possibly check the locale of the User who initiated the event that called your trigger, I can see numerous potential pitfalls to that type of approach. I think you'll need to find some means of determining the ISO code in which the Opportunity Amount was saved on each record if it's not saved along with the values in your custom fields.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .