• Manoj1822
  • 0 Points
  • Member since 2018
  • Salesforce Consultant
  • Prelude Systems Inc

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3

Hi I am writing an Apex Class that updates the currencys exchange rates and I get this error:


 DML not allowed on DatedConversionRate


I have seen apps, in javascript, and flex that updates the currencies, but why apex can NOT?


best regards 

I've seen a few posts concerning this subject, but is there an alternate way to fetch a conversion rate for money on an web site and save it in a variable to use it in reports?


I'm really interested to know if someone knows a good or better method to this or something really close,



I've been tasked with automating updates to the Dated Exchange Rates; however, I can't seem to figure out how to work with the API to get what I need accomplished. I assume that since there's no create() call allowed on the object, that the update() call will do the backend work for me as far as capping off the old DatedConversionRate's NextStartDate based on the StartDate of the new DatedExchangeRate and then create a new record with the other information provided.


So I tried implementing the update() call, and I get a error response saying "A duplicate value was specified for field 'Id' in object 'DatedConversionRate', duplicate value '<Id value provided>' prior value '<Id value provided>'." Ok, so given the previous assumption based on allowing only update() calls on the object, maybe it doesn't require an Id in the call. Alas, "Id not specified in an update call."


At this point, I'm completely stumped. Any ideas?