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

Hi Community,

I have a custom page where I have a multi currency field. When I am calling MoneyModule.RecalcBaseValue.call method I am getting undefined exception. Please help me how can I fix this issue. Thanks

 

Like 0

Like

2 comments

I think it is conflicting on my dependencies declaration, aside from 

MoneyModule, MultiCurrencyEdit, MultiCurrencyEditUtilities

i am declaring also a css page, this css page is for the layout of my custom page. When I tried to remove my css page on the declaration, now it is working, Now how can I declare multi currency dependencies and my css page at the same time, without causing conflict to each other?

Fulgen Ninofranco,

It seems like the incorrect order of passed parameters to the function() is the cause of the issue. Please note that the order of dependencies in the dependencies array enumeration must correspond to the order of parameters in the enumeration passed to the factory function.

Try to add a css page declaration to the end of the dependencies array.

 

Show all comments