The new force:recordData
component is awesome since it allows us to retrieve sObjects without a direct apex server call. However as a managed package provider, we have a very common situation where we need to conditionally include the CurrencyIsoCode
field if the organization is using multiple currencies. It looks like including this in the fields
attribute causes an internal server error when the org is single currency. It would have been great if this was supported but I am not surprised that it isn't. This leads me to two questions:
- Is there any way to determine if an org is multi-currency without hitting the server? It doesn't look like this info exists in any of the global value providers.
- If we need to hit the server to determine what fields to query, is there actually any advantage to using the
force:recordData
component? It seems as though this may result in two server calls a lot of the time.