Development questions
Write a SOQL query to convert Currency fields into the user's personal currency in a Multi-Currency org (SELECT Id, convertCurrency(Amount) FROM Opportunity).
In a multi-currency org, convertCurrency() returns the amount converted to the running user's personal currency.
soql
SELECT Id, Name, convertCurrency(Amount) FROM Opportunity
You can also filter in a specific currency using WHERE Amount > USD 10000. Note that convertCurrency() can't be used in GROUP BY or aggregate functions in the same way.
soqlscenariomulti-currency
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?