Adding new source currency with setFxRate automatically

JohannJ
New Contributor II

Hi,

I'm currently setting FxRates via BR using below snippet:

objFxRatePk = new FxRatePkUsingNames(osFxRateType, osFxRateDate, sourceCurrency, targetCurrency);
objFxRate = new FxRateUsingNames(objFxRatePk, decimal.Parse(rate), true, false);
objFxRateList.Add(objFxRate);
// <removed for brevity)
BRApi.Finance.Data.SetFxRate(si, item);
// <snip>
BRApi.Finance.Data.LockFxRate(si, rateType, currentMonth);

It works fine but when a new source currency is added, it doesn't show up in Application/FX Rates table.

*** EDIT - realized I didn't phrase this very well ***

Am I missing a step somewhere?

Am I missing a step somewhere to automate this? Or is it not possible?

1 ACCEPTED SOLUTION

MarcusH
Contributor III

I think you will need to add the currency to the Application Properties Currencies list before it shows on the FX Rates module.

View solution in original post

4 REPLIES 4

MarcusH
Contributor III

I think you will need to add the currency to the Application Properties Currencies list before it shows on the FX Rates module.

JohannJ
New Contributor II

Yes, that's what I think too, I was just hoping there was some way around that

You could update the AppProperty table with the new currency. The record you want is Name = CurrencyFilter and TextValue contains the list of application currencies separated by a comma. I don't know what impact that will have on other aspects of the application. And you will have to make sure it's a valid currency as the FXRate table uses a CurrencyID column. I don't know where/if the currency list is held. I wouldn't do it.

JohannJ
New Contributor II

Thanks Marcus, I wouldn't either 😉

Please sign in! JohannJ