How to batch update Currency Exchange Rates

Posted by smartsysISV on 20-Nov-2014 04:50

I can't find "Currency Exchange Rates" as an object/table?

All Replies

Posted by Gian Torralba on 20-Nov-2014 08:36
Hello,

What do you mean that you want to batch update the currency exchange rates? You can find more information about currency in Rollbase User Guide: Chapter 5, Multi-Currency Support.

Thank you,
Gian
Posted by smartsysISV on 25-Nov-2014 01:48

I have to update all currencies on daily basis and then I have to read this from awebservice, file etc and update many exchange-rates. I have nowlocated the setExchangeRate in the SOAP-section but is this the only way (SOAP).

Isn't there any server-side api setExchangeRate??? Is the SOAP-command the only way to do this?

Posted by Gian Torralba on 26-Nov-2014 08:44

Hello,

I didn't see any server-side method for setting the exchange rate but if you need to update every record of an object on a daily basis, you can use a batch job that will run daily and have this code inside.

var amount = parseFloat("{!amount#value}");

var rate = rbv_api.getExchangeRate("EUR", "USD", new Date()); /*method to get current exchange rate*/

var finalRate = rate * amount;

rbv_api.setFieldValue("object_name", parseInt("{!id}"), "field_name", finalRate); /*updates the records converted amount*/

I don't know if this is the one you need. Let me know if this helps.

Thank you,

Gian 

Posted by Gian Torralba on 26-Nov-2014 08:50

Hello,

Another method is to create a field in the settings page that holds the current exchange rate value. Then create a batch job that will update that exchange rate value daily by using the getExchangeRate method. After that, just create a formula field that will display the computed amount on the record so that the value is automatically updated based on the value in the settings object. I believe this is more optimized than updating all records daily. Just check if data maintenance in the batch job applies to the settings object.

Thank you,

Gian

Posted by smartsysISV on 27-Nov-2014 06:55

This is ok, but what I want is to set the exchangerates wich you retrives with the command: rbv_api.getExchangeRate.

Why ii there no command like: rbv_api.getExchangeRate

I see a corresponding one in the SOAP-section, but this requires a external program.

Posted by Gian Torralba on 01-Dec-2014 08:15

Hello,

Unfortunately, there is no server-side method for setting up the exchange rates in Rollbase. However, you may post this as an Idea in the Ideas section by going thru this link https://community.progress.com/community_groups/products_enhancements/.../default.aspx

Thank you,

Gian

Posted by pvorobie on 01-Dec-2014 12:13

Tracking enhancement as PSC00322492

Posted by murali on 07-Feb-2015 20:53
Hello, Could you please elaborate?  Are you talking about a batch job to update exchange rates at regular intervals?
 
Posted by smartsysISV on 08-Feb-2015 23:58

yes

This thread is closed