Currency information refresh, when updating table

SUGGESTED

Hello,

I am running a script that updates the currency table in my database daily with the new exchange rates. Via js-script I am performing a metadata update with "CRM.refreshMetadata()" to pass the information to the screens. Through the logs I can see that the metadata refresh has been detected and executed. Unfortunately the new values for currency are not passed everywhere in CRM.

When I open an opportunity, a "Total Contract Value" that is different from the base Currency, does also show the value in base currency. However at this point I do not get the correct exchange rate. Below picture shows the information in the opportunity where the currency exchange rate has not been updated. 

I think that there is some sort of other data behind the information that I miss to refresh. But by reading the log-files and google search results I did not come to an answer. Any sugesstions what I did miss?

Kind regards

Parents
  • 0

    Hi Flieger,

    I just tested this and I am not getting the same result as you. 
    Have you tested this by going into the Currency settings in CRM and changing it there and then going back to the oppo? That's how I'm testing it and it works fine for me.
    You can also inspect the SQL that gets executed if you are so inclined -> SELECT Curr_CurrencyId, Curr_Symbol, Curr_DecimalPrecision, Curr_Rate FROM vSearchListCurrencies. That's mostly my SQL. If the value is changed in SQL at the time the query is executed, then it should return the most current value in SQL. 

  • 0 in reply to Conrad Roux

    Hi Conrad,

    maybe my description was a little irritating. I changed the currency value by doing an UPDATE Statement on the database directly. Changing the currency in the Administration section works as expected, but doing an update on the database table does not have the same effect. 

    If I am operating a metadata refresh from console, only the currency table in the Admin section gets updated, not the values in the oppo.

  • 0 in reply to Flieger

    When I do the Update-Statement and look at the values in vSearchListCurrencies before and after, they have changed.

  • 0 in reply to Flieger

    Oh I see. Forcing a meta-update is the key here. I just tested as you explained and I needed to do a metadata (Refresh System Parameters) in order for it to show up correctly. It could be in code the update is not performing the required refreshes correctly.

    Let me see what I can test on my side with some code as well.
    Can I have some background as to what CRM version you are running and how are you executing the script? Is TLS/ASP Page? How does that script get triggered to run?

Reply
  • 0 in reply to Flieger

    Oh I see. Forcing a meta-update is the key here. I just tested as you explained and I needed to do a metadata (Refresh System Parameters) in order for it to show up correctly. It could be in code the update is not performing the required refreshes correctly.

    Let me see what I can test on my side with some code as well.
    Can I have some background as to what CRM version you are running and how are you executing the script? Is TLS/ASP Page? How does that script get triggered to run?

Children