function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC ROCKSFDC ROCK 

currency field insert/update from one object to other

I have one trigger where I am inserting/updating one field called Amount (Currecny (16,2)) from opportunitylineitem to object A (which is related object on opportunity).

suppose:

opportunitylineitem  amount :2 EUR

getting result 
object A      amount :2 USD

expected 

object A      amount :2 EUR


what could be the issue ?
AnudeepAnudeep (Salesforce Developers) 
Do you have multi-currency enabled in your org? By default, page layouts for such objects have multi-currency-compatible fields in which you can specify the currency for the record and the fields take the same currency

After enabling multi-currency records are stamped with a default currency code that you provide in your enablement request. For example, if your organization contains records using USD and EUR, salesforce recommends switching them all to the same default currency before enablement

https://help.salesforce.com/articleView?id=admin_enable_multicurrency_implications.htm&type=5