I have a list of 41K zip codes that are all are connected to a DMA. The business would like to enter in a zip code and then based on that value automatically return the DMA value in the Market2__c field. This could be done with a formula but it would be so long, that I think it would be unmanageable. I could do a dependent picklist but then I would have to change the format of the zip code field and would have to make a separate field for Market2__c because it is a formula field and the data type can't be changed. There aren't enough workflows to turn this into a series of workflows. Even if that amount were available I wouldn't want to do it that way. I was going to try a custom object with a trigger. Here is what my trigger looks like so far. Any suggestions?
trigger InsertDMA on Lead (before insert, before update) {
for(Lead lead : Trigger.new)
{
string DMA = DMA_Value__c.getInstance(lead.PostalCode).DMA_Value__c;
lead.Market2__c = DMA ;
}
}