A multi-currency org has corporate currency USD. A Mexico-based sales manager whose user currency is MXN opens a Lightning web component that lists opportunities from several countries, and wants all amounts shown in MXN. Which query should the Apex controller use?
- SELECT Name, Amount FROM Opportunity, then divide by the MXN rate in JavaScript
- SELECT Name, FORMAT(Amount) FROM Opportunity
- SELECT Name, convertCurrency(Amount) FROM Opportunity
- SELECT Name, Amount FROM Opportunity WHERE CurrencyIsoCode = 'MXN'
Show answer
Answer: C
Why: In multi-currency orgs, convertCurrency() in the SELECT clause converts currency field values into the user's currency.