Forum Discussion
- JackLacavaHonored Contributor
I guess it will depend on the rule you're using to generate that override...? You might have to provide a bit more information. Generally speaking, you have to remember that (by default) Calculate runs on Local Currency of Parent member too, as last step of Consolidation, so you might have code that is running when it shouldn't (i.e. in your formula you might have to check if the member is a parent or child before you execute api.Data.Calculate or other things).
- DanTennecoNew Contributor II
We are leveraging the text1 field = USD for accounts and added in the flow dimension If (api.Entity.HasChildren()) And LocalCurrency.Name.ToString <> "USD" Then Api.Data.Calculate(....). Even using this it pulls local currency to the parent and then translates it to USD.
- JackLacavaHonored Contributor
Ah, I guess you're using a specific Flow Processing Type then...? It's a bit above my pay grade, but for the benefit of anyone who might really know how it works, you might want to paste the "Flow Processing" section of your Flow member to complete the picture.
As general tips, always make sure your "if" blocks actually get executed, liberally dropping something like api.LogMessage("running") inside them and then checking the log; and maybe use api.Cons.IsLocalCurrencyForEntity or isForeignCurrencyForEntity, rather than comparing strings (which should be done with .xfEqualsIgnoreCase anyway).
Related Content
- 2 years ago
- 10 months ago