+ Start a Discussion

How to auto populate a lookup field in a related record

I have a custom object Called TL which has a lookup field to Opportunity and to Account. If I create a TL record from within an Opportunity record I would like to auto populated the Account Lookup field with the same details that are on the Opportunity Account Field.

The Salesforce Edition that I am working on is a Professional Edition. 

Can this be achieved on Professional?
Siva Sankar PaluriSiva Sankar Paluri
Hi Nevin,

Instead of creating a lookup field to account , just create a lookup field to opportunity and create a formula field(Select required account details as shown in below image) with return type as text which will

fetch account details related to the opportunity.
I tried this in developer editon,
Its working. Please try in professional edition as well.

Attached an image for your reference.
User-added image

Hi Siva,

Thanks for your reply. I should have mentioned in my post that the reason the Account field in TL is a lookup field is becuase the TL record needs to show as a related list item in the Account record. 
It's becuase of this that a custom formula field won't work. 
Marcelo TudiscoMarcelo Tudisco
Hi, did you found any solution to your problem?
Nevin O'Regan 3Nevin O'Regan 3
HI Marcelo, 

A bit of custom code was required for this to work. 
Marcelo TudiscoMarcelo Tudisco
Thanks Nevin, could you please tell me what you did?
Hi, any hopes of expecting answer?
Jarrett CarperJarrett Carper
I know how to do this with process builder, but was hoping this is possible without that.  Any luck?