function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bkradminbkradmin 

Pulling data from contact to account

I am trying to write a formual for a field on an account that would display data from a contact. For example, say I have an account that has multiple contacts, each with a distinct identifier; (there is one "President", one "Vice President", and one "COO"). I want a field on the account page to display, for example, the Last Name of whichever contact is identified as "President". How would I go about this?

 

I have seen this question discussed in reverse, but never this way. 

Venkat PolisettiVenkat Polisetti

 

You can achieve that using a trigger, if you want to go that route, otherwise it is not possible.

 

You cannot use cross object work flow field updates with Accounts and Contacts as this combination is not supported.

 

 

Rahul_sgRahul_sg

Yes as mentioned earlier you need a trigger for this. Create a trigger on Contact object and populate the Account field .i.e. update the account record if contact role is president 

sandeep@Salesforcesandeep@Salesforce

It is not possible using formula field because in formula field we can fetch value from parent to child but here we need to fetch value from child to parent. 

 

AdrianCCAdrianCC

Hello bkradmin,

 

Yes, you cannot go from a parent to get data from a child, but that doesn't mean you cannot go the other way around:

 

Create a WF rule on the Contact object that checks wheter Title(or whatever your field is called) == 'President. The workflow rule will fire a field update on the Contact.Account.President_Name__c to get the Contact.LastName.

 

Thanks,

Adrian

sandeep@Salesforcesandeep@Salesforce

I think all are tuned on same way so