How can we add currencyIsoCode field to every model in a skuid page conditionally if the org is mult

Ashish,

First of all, in Multi-currency Orgs, Skuid automatically queries for the CurrencyIsoCode field on all Models where a Field whose Display Type is CURRENCY is included. This is done across relationship fields as well.

For example, if you were had a Model on the Opportunity object and requested the Amount field, Skuid would automatically query for the CurrencyIsoCode field because Amount, a Currency field, was requested.

The nice thing about this for your scenario is that you can rely on Skuid querying for this field, so you don’t have to.

However, this does not necessarily help you if you are trying to add the CurrencyIsoCode field to the UI so that users can modify it, as Skuid does not currently pull down the field metadata for the CurrencyIsoCode field automatically. 

Here’s my recommended approach:

1. Include the CurrencyIsoCode in the Model, and in any UI Components as appropriate.
2. At runtime, for users in non-multi-currency orgs, Skuid will automatically, gracefully strip out the CurrencyIsoCode field from any Models that request it, as well as from UI Components, e.g. Tables, where the field is referenced. The red error message (a “Page Problem” in Skuid terminology) that you are seeing will NOT appear for normal Users — this message only appears to Users that have the ability to edit Skuid Pages. So as long as your customers have their Skuid Permissions correctly setup so that they do NOT have the ability to edit Skuid Pages, they will not see this error message.

On the Skuid side, we’ll talk this over, but to me right now it seems like we should just hide the red error message automatically for users in non-multi-currency enabled orgs. We could be smarter about the error and say “The field being requested is CurrencyIsoCode, but this is not a Multicurrency org. Don’t display the error message we usually would, just strip the field from the Model at query-time like we already do, and move on”.