Skip to content

Missing multi-currency field

Detection

  • RegExp: A reference to a custom field (.*)CurrencyIsoCode
  • RegExp: no CustomField named (.*)\.CurrencyIsoCode found
  • Replaces: Custom field not found

Examples

  • Error Admin In field: field - no CustomField named Account.CurrencyIsoCode found

Resolution

Multiple currencies are not activated in the target org.
- Activate them in Setup -> Company Information -> Currency Setup: this can not be undone, so check it with the owner of the org
- In a scratch org, add MultiCurrency to the features of project-scratch-def.json
- If the target org must stay single currency, remove the CurrencyIsoCode references from your sources: list the items in a destructiveChanges.xml file, then sf hardis:project:clean:references --config <that file> removes every reference to them from your sources

Comments