How is fx_system_rate records updated/populated?

Fer Ortiz
Tera Contributor

Hi all, I'm trying to understand how fx_system_rate records are updated o inserted. Basically, I am trying to make a currency convertion between some currencies (USD,EUR, etc) to MXN. 

I'm using  GlideConverter class to make this convertion, here's and example: 

 

Fernxndo_0-1702420662526.png

 

I noticed that call that API creates a record on that table, but ¿where is the initial rate stored in servicenow?

I tried to look for that value in fx_rate table: but the latest value value does not match with the value used for GlideCurrencyConverter or GlideConverter :

Fernxndo_1-1702420860255.png

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Marcos Kassak
Kilo Sage
Kilo Sage

Hi @Fer Ortiz.,

 

These records are maintained by the system. Please check the below ServiceNow Support article that also explains a little bit about conversions:

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0751553

 

The fx_rate table will hold all exchange rates. As an example the system would convert the AUD value to EURO then EURO to USD to set the reference currency.

 
(Entered Amount / Exchange rate for Currency entered) * Exchange rate currency for the system locale
 
Please see the following documentation for further information regarding currency conversions
 

 

If you found my answer helpful or correct in any way, please don't forget to mark it to help future readers! 👍

 

--

 

Kind regards,


Marcos Kassak
Solution Consultant  🎯

View solution in original post

1 REPLY 1

Marcos Kassak
Kilo Sage
Kilo Sage

Hi @Fer Ortiz.,

 

These records are maintained by the system. Please check the below ServiceNow Support article that also explains a little bit about conversions:

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0751553

 

The fx_rate table will hold all exchange rates. As an example the system would convert the AUD value to EURO then EURO to USD to set the reference currency.

 
(Entered Amount / Exchange rate for Currency entered) * Exchange rate currency for the system locale
 
Please see the following documentation for further information regarding currency conversions
 

 

If you found my answer helpful or correct in any way, please don't forget to mark it to help future readers! 👍

 

--

 

Kind regards,


Marcos Kassak
Solution Consultant  🎯