Get Converted Amount from GlideCurrencyConverter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2022 11:09 PM
Hi,
I'm doing currency conversion using GlideCurrencyConverter. The amount is getting converted,
I'm not sure how to retrieve the converted amount.
var conv = new sn_currency.GlideCurrencyConverter('USD', 'INR');
conv.setAmount(1);
gs.log(conv.convert());
Output: CurrencyExchangeValue{fOriginalAmount=1, fOriginalCurrency='USD', fRate=79.510217, fAmount=79.510217, fCurrency='INR', fRateSysId='5553445f494e525f3230323230383135'}
Please help me to get the converted amount. (i.e, fAmount in the above output)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2022 11:47 PM
Please refer to the document below
https://developer.servicenow.com/print_page.do?release=quebec&category=null&identifier=GlideCurrencyExchangeValueScopedAPI&module=api
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2024 03:52 AM
Hi Harish,
Did you get any answer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2025 07:26 AM
Ran into this with the same issue, there's an additional API that contains the functions to grab values from the original currency conversion that is not referenced in GlideCurrencyConverter: GlideCurrencyExchangeValue - Scoped
For your example, you would want to do: