You need to sign in to do that
Don't have an account?
Static initialization of a table?
We have a trigger that does some basic geographic cleansing (e.g., mapping country abbreviation "US" to international territory "AMER", mapping U.S.A to US, etc.).
The trigger relies on a utility class that initializes a set of lookup tables. For example...
Map<String, String> CountryAbbreviationToInternationalTerritoryMap = new Map<String, String>();
CountryAbbreviationToInternationalTerritoryMap .put('BI', 'EMEA');
CountryAbbreviationToInternationalTerritoryMap .put('KM', 'EMEA');
...
Because there are a large number of entries to initialize the table with, we run into the "too many script statements" governor limit when this utility class is invoked from a trigger.
Is there a best practices for initializing a lookup table that doesn't require a lot of script statements?
~Bob