I'm working on a small application in which I want the user to be able to enter a conversion rate on a VF page. The conversion rate should be saved in the CurrencyType object. I wanted to use something like this:
CurrencyType ct = new CurrencyType(ISOCode = 'GBP');
ct.ConversionRate = 4.0; //or some variable
upsert ct ISOCode;
But if I try to save this code I get the following error: DML not allowed on CurrencyType
. How can I update the conversion rates from Apex?
Edit; If I change the upsert to update I still get the same error message; DML is not allowed on CurrencyType. Is there any other way to do an update in Apex, besided DML?