ConvertCurrencyField
Converts the currency field in the specified objects to the organization currency.
Map<ID, Decimal> ConvertCurrencyField(List<SObject> objs, String fieldname, String datefield)
Parameters
- objs - A list of sObjects
- fieldname - A currency field on the sObject specified in objs
- datefield - A date field on the sObject specified in objs that's used to determine the dated exchange rate
Returns
Map of object ID to currency value for the field. In non-multicurrency organizations, creates a map of object ID to the decimal amount values.