On a recent Salesforce implementation, we identified a need to map a single lead field to two different fields - one on the contact and one on the opportunity.

My initial thought was to create a trigger to fire on lead conversion that would populate the second field. However, I always try to look first for a non-coding solution. Which brought me to the fairly simple idea of creating a second field that would use a workflow field update to copy the value of the original field. The new field would be hidden from the users, but would be used for the sole purpose of mapping to the second destination field. I thought I'd found the perfect "clicks not code" solution ...

until I realized my field was a lookup field, a field type that can't be updated by workflow. Drat.

So, I did need a bit of coding in order to update the second, hidden field with the value of the original field. I created a very simple trigger to set the value of the second lookup field to match the first.

trigger CopyCampaignSource on Lead (before insert, before update) {

for (Lead l : Trigger.new) { l.c5_Campaign_Source_Opp__c = l.c5_Campaign_Source__c; } }

Would I have been better off going with my first instinct, which was to create a trigger to fire on lead conversion?

In hindsight, maybe. But, this method was still simple and effective, and I think it's always worth it to explore non-coding solutions first - especially knowing that most implementations will ultimately be maintained by non-developers and, therefore, should be as admin-friendly as possible.