+ Start a Discussion

copy field from account to all related contacts

We have have a custom field that we originally put on the account...  Well now it seems that we need to be able to access that via a 3rd party email marketing system, but they can only read the fields on a contact.


What's the easiest way to get Account.ShortUrl__c to populate Contact.ShortUrl__c on every contact in the system? 


I'm familar enough with the API to be able to do this via querys from my servers with PHP... but that's overkill and I'm sure this can be done from salesforce directly.  


I know this code won't run, but it's as far as I can get...



trigger UpdateContactonAccountUpdate on Account (after update) {
for (Account a : Trigger.new) {
Update Contact set Contact.ShortUrl__c = a.ShortUrl__c;



Any ideas on how to make that actually work? 


I have since found that the best way to do this is to use a formula field in the contact... but so I'll know later, I'd still like to know how this is done.