- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 09:03 AM - edited 03-03-2024 11:03 PM
Hello,
We have a requirement that there are two fields "Currency Dollar" and "Currency Pound". Dollar amount needs to be converted to a pound
Could you please anyone help me with this?
Thanks in advance,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 09:26 AM
Hi @Rama Rao ,
Here is a sample code you can try -
var conv = new sn_currency.GlideCurrencyConverter('USD', 'GBP');
conv.setAmount(100);
var convertValues = conv.convert();
gs.info('Exchanged Amount: ' + convertValues.getAmount());
Please follow the below links, here you will find detailed explanation on how to convert currency-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 09:26 AM
Hi @Rama Rao ,
Here is a sample code you can try -
var conv = new sn_currency.GlideCurrencyConverter('USD', 'GBP');
conv.setAmount(100);
var convertValues = conv.convert();
gs.info('Exchanged Amount: ' + convertValues.getAmount());
Please follow the below links, here you will find detailed explanation on how to convert currency-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 04:34 AM - edited 03-03-2024 11:08 PM
Hello @Anirudh Pathak ,
Thanks for the quick response.
How it works? and from which release does this code work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 07:00 AM - edited 03-02-2024 07:01 AM
Hi @Rama Rao
Conversion rates are stored in the fx_rate table. Each record contains the conversion rate from a given currency to the Euro. The rates are updated daily from the ECB website by a scheduled job called ECB Exchange Rate Load.
The code shared above will work for all release.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2024 11:11 PM - edited 03-03-2024 11:04 PM
Hello @Sohail Khilji ,
I have tried and not working properly. Could you please help me and correct the code?
Note: The created new fields are type of integer