You need to sign in to do that
Don't have an account?

automatic update field for money currency conversion
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,
thanks.
Create an Auth. Providers
Create a Named credentials.
Step by Step instruction is given in the below two URLs.
http://www.jitendrazaa.com/blog/salesforce/salesforce-to-salesforce-integration-using-named-credentials-in-just-5-lines-of-code/
https://www.jitendrazaa.com/blog/salesforce/login-to-salesforce-from-salesforce-using-authentication-provider/#more-4516
Once the above configuration is done, please use the below piece of code to update the Managed Dated Currency.
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());
}