You need to sign in to do that
Don't have an account?

auto populate fields from lookup field
Is there a way to auto populate several fields based on the value from a lookup field?
For example, I have a custom lookup field on the Account object. When the user selects the account, I would like three custom fields (text boxes) to be auto-populated with the address, city and state from the account the user selected.
Is this possible? If so, how?
Thanks.
Thanks for the tip.
Has anyone tried this yet? How do I get the value of the lookup field's street ? E.g. Parent account.street ?
Thank you to all for heloing on this issue.
Chris
Well, I used the formula builder, but I couldn't find a way to fill a text field with the billing street of the account in the lookup field (or the parent account's billing street).
Has anybody got an idea?
Thanks in advance,
Christoph
This has to be possible. In the standard Contacts tab, when you pick an Account, the mailing address fields are automatically populated. The funtionality exists, I just can't find it.
TRY this code defenitly u get the solution for Autopopulation just you have to make Looup relation with User
trigger populateContactfromUser on Contact (before insert , before update){
Set<ID> setConIds = new Set<ID>();
for(Contact obj : trigger.new){
if(obj.User_Name__c!= null)
setConIds.add(obj.User_Name__c);
}
MAP<ID , User> mapCon = new MAP<ID , User>([Select Id,Email,Phone from User where id in: setConIds]);
for(Contact obj : trigger.new)
{
if(obj.User_Name__c != null)
{
User c = mapCon.get(obj.User_Name__c);
obj.Email= c.Email;
//Similarly you can assign Address fields as well, just add those field in Contact SOQL as well
}
}
}