4

Is there a way to find if the Advanced Currency Managementenabled using api or apex or soql?

I have able to check if the multi-currency is enabled by using the api endpoint /services/data/v40.0/connect/organization but could not able to find how to find if ACM is enabled, is that possible?

enter image description here

Nick
  • 7,012
  • 24
  • 131
  • 276

2 Answers2

4

From research:

If Multiple Currencies is not enabled:

  • The CurrencyType and DatedConversionRate Sobjects are not exposed.

If Multiple Currencies is enabled:

  • Both CurrencyType and DatedConversionRate Sobjects are exposed.
  • But, if Advanced Currency Management (ACM) is not enabled, DatedConversionRate is not createable (by checking the Sobject's describe).
  • When ACM is enabled
    • DatedConversionRate is createable.
    • DatedConversionRate will have at least one record.
  • ACM can be disabled, and when disabled:
    • DatedConversionRate will no longer be createable.
    • DatedConversionRate records will still persist.
Scott Pelak
  • 7,514
  • 2
  • 39
  • 72
  • To be more precise here, just to check whether sobject is createable or not does not help. You need to check creatable attribute for DatedConversionRate.IsoCode field. – Tehn-r Mar 19 '24 at 17:03
1

I'd check if the metadata is present for DatedConversionRate. It should only show up if

multicurrency and the effective dated currency features are enabled.

Currently you will need to drop out to either the REST API or the SOAP API to do this. See Updating multi currency rates from Apex

Daniel Ballinger
  • 102,288
  • 39
  • 270
  • 594
  • what will be the rest api endpoint? – Nick May 04 '18 at 02:30
  • Yes. A REST API endpoint like /services/data/v42.0/sobjects/DatedConversionRate/. Start with /services/data/v42.0/sobjects and see if it comes back as a defined sObject against that org. – Daniel Ballinger May 04 '18 at 02:34
  • 1
    did not work, i have NOT enabled ACM and I still see the sobject/DatedConversionRate in the api endpoint. – Nick May 04 '18 at 17:35
  • While hitting : /services/data/v54.0/sobjects/DatedConversionRate/describe you need to check "createable": false, that means ACM is disabled if it is true that means ACM is enabled since you have option to turn on/off ACM anytime. Hope this helps. – Gurmeet singh Jul 20 '23 at 13:22