You need to sign in to do that
Don't have an account?
Srinivas C
when dated exchange rate of DatedConversionRate is saved, automatically create a record in company with the details of foreign exchange rate schedule record
Please Help ASAP
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
You can call the REst API
https://developer.salesforce.com/forums/?id=906F00000008xMkIAI
https://salesforce.stackexchange.com/questions/17380/update-conversionrate-in-test-class
https://th3silverlining.com/2009/11/23/dml-currently-not-allowed/
https://salesforce.stackexchange.com/questions/175205/manage-datedconversionrate-using-apex?noredirect=1&lq=1
HttpRequest feedRequest = new HttpRequest();
feedRequest.setEndpoint('callout{Named_Credentials}/services/data/v36.0/sobjects/DatedConversionRate/'+ {idDatedConversion} +'?_HttpMethod=PATCH');
feedRequest.setBody('{ "ConversionRate" : '+ {rate }+' }');//Rate to be updated
feedRequest.setHeader('Content-Type', 'application/json');
feedRequest.setMethod('POST');
Http http = new Http();
try
{
if(!Test.isRunningTest()){
HTTPResponse feedResponse = http.send(feedRequest);
}
}
catch(Exception ex)
{
System.debug('exception in BatchCurrecnyCovnersionUpdate.execute method '+ex.getMessage());
}
For your reference,
https://success.salesforce.com/answers?id=9063A000000iWjxQAE
https://success.salesforce.com/answers?id=90630000000gzoCAAQ
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.