+ Start a Discussion

Auto Populate Fields from Account record to a Custom Object

I have created a custom object (tab) that has the following fields: Account Name (look up), Sales Executive, Account Manager, and TAM. These field are also listed in the Account record. Is it possible to have the data for the Sales Executive, Account Manager, and TAM fields auto populated in the custom object based on the account that is selected in the Account Name field?
The only way to do that today is with workflow field udpates (available in Enterprise Edition and above).  The downside is that this data is only populated when the custom object is saved, not of the account record changes.  There is no way to do it dynamically (have the fields populate when you select the Account name in the lookup).

In the Summer '08 release, you will be able to create custom formula fields that reference merge fields in parent objects.  Thus, in this scenario you would be able to create a custom formula field on the custom object that refers to the Account fields you want to display.  This is the best approach because it means that the data is always up-to-date.
mscotton: Well, I wouldn't say workflow field updates are the only way. You could certainly use Apex triggers (currently available in Enterprise and Unlimited) to keep the fields in sync.
You'd probably need one firing when Accounts save and one when records for your custom object are created (or edited, if you want to play safe).

But as you say, the new functionality planned for Summer '08 is, if it delivers on promise, is definately worth waiting for if your need isn't very very urgent.


Do you know if Summer 08 would allow this scenario?

STEP 1: Custom Object 1 - Has fields manually populated by user

STEP 2: Custom Object 2 - Has corresponding fields which are also manually populated by a (different) user.  When Custom Object 2 fields are entered they automatically update the values in the corresponding fields in custom object 1.

The two object are not related (but could be)




I have a similar situation.

We have a custom object called Research Profiles (the master object is Contact).  I made a custom button so when you create a new research profile, it auto-populates various fields from the Contact's record to the research profile (address, phone, etc.).

The only problem is if someone goes and changes the contact's address in the record detail page, the address that's listed in the research profile is still the old one.  Sorry to be redundant, but does this mean an APEX trigger and/or a workflow field update would update the field in the custom object when the field in the master object is updated?


You should be able to do this now with a formula field.  We have a custom field in the Account record.  We have a related Custom Object (has a lookup to Account Name) with a custom formula field that we populate with the value from the Account custom field. 
With the formula method, after the custom object is saved, if someone updates data in a text field in the Account record, will that same field be updated in the saved custom object?
Yes, anytime the data changes it will be reflected in the related record formula field. 
Does that include auto-updating fields that are included in a related list?

Can it work backwards?  If a field is updated in a related list, can it auto-update the field in the master object?
A formula field will always reflect the value of the field that it is equal to.  So no matter where or when you edit the field that
it is equal to the formula field will reflect that value. 
Try it and see.