Hi Community,

 

We have this situation, where we need to update every day our currency rates through a business process that we've already implemented. In this process, we receive the latest rate from our api and we create a new record in the CurrencyRate detail with that rate.

Objects: CurrencyRate, Currency.

 

As you can see in the print above, after we added the new record (inside red box), the "Taxa" field, didn't update. We want to know:

  1. How can we solve this issue?
  2. Is there any trigger that is executed when we insert a new record in this detail?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Like 0

Like

2 comments

Hello Pedro,

 

Hope you're doing well.

 

To perform the mentioned business task your process needs to:

— read data from "Exchange rate" object, but not from "Currency" object or other objects (in this case the process will be triggered by adding records to the "Exchange rate" object);
— read the exchange rate that is set for your currency and that has "End" (on your screenshot it's "Fim") column value set as NULL (meaning currently active exchange rate).

 

Also, you can use web services for updating daily rate currency. For example, "https://fixer.io/"web service, which we recommended to use in one of our articles:

https://academy.creatio.com/docs/user/no-code_customization/web_service…

 

In the following link, you can find the way of implementation of the mentioned web service:

https://academy.creatio.com/docs/user/no-code_customization/web_service…

 

General information on how to work with currencies can be found here:

https://academy.creatio.com/docs/user/platform_basics/user_interface/wo…

 

Best regards,

Roman

Roman Rak,

 

Hi Roman,

 

I'm working together with Pedro on this issue and we found the problem.

As we bounded the data of "currency" table from pre-prod to prod environment, the exchange rate was filled in in the "Rate" column with the last value in the prod environment.

Once in the prod environment we have deleted the values in the "Rate" column, the currency table is working as expected.

 

Thanks for the help,

Luis

 

Show all comments