function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Display USD to INR Using Utility Class

Hi ,

I have follow requirement ... 

Create utility class to manage currency rate and Write trigger to fetch the currency value by passing currency("USD") as input.

I am new to development , little struggling while create a class.

Could anyone please give me  a sample code of ' utility class to manage currencey rate '
Enable multi currency and setup currency rates. Query the currency rates (SELECT Id, IsoCode, ConversionRate, StartDate, NextStartDate FROM DatedConversionRate ORDER BY NextStartDate DESC) and create apex method to build your logic
Use external web services like ( to integrate with salesforce. You can pass the value and get the desired rates.
Create you own data model i.e custom object and store the currency rates on daily basis. Build logic to create a method and utilize this object to get desired result.
Hi Anupam,

I like  to add Currency as Static value in Custom Settings .. So How Can i do further Process.
Could you send me a sample code of this process.

+91- 7418425418