Advanced Developer Fundamentals
15% of the examWhat this topic covers
Apply localization and dated exchange rates correctly, and choose Apex-managed sharing when access needs distinct reasons. Use custom metadata and settings to build maintainable configuration that fits deployment needs.
How should an Apex batch convert order amounts into a corporate currency when the running user has a personal currency?
Use the dated exchange rate that matches each order's business date. Dated conversion rates are stored in the DatedConversionRate object, so the converted amount depends on the order and not on the running user's personal currency or today's rate. A batch run next month still produces the same totals for last quarter's orders. For example, an order dated March 3 is converted with the March 3 rate, even if the job runs in April.