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
SueHallSueHall 

Formula Field - Auto-pop a value from std object to custom object

I have two fields - one in a standard object and one in a custom object.

When the value for the field in the standard object is populated I would like the corresponding field in the custom object to be updated with the same value.  Is there a way to do this?
werewolfwerewolf
Is the custom object in some way related to the standard object?  A lookup relationship maybe, or a master detail?
nrwingnrwing
I also have a similar situation.  I have a custom object set as a detail to the master opportunity object.  I would like to set the value on the detail record (called Market, which is a picklist value) to match the same field value of the same field on the master opportunity record at the time the detail record is created.  In other words, if the opportunity record picklist field called "Market" is set to "Atlanta" then I want the same field on the detail object to be set to Atlanta when that record is created....i.e. the default...
werewolfwerewolf
Why don't you just make a formula field on the detail object which pulls the value from the master using a merge field then?  No need to actually copy that value.
dbrunsdbruns

I have the same issue only it is a Related object, not Master Detail. Any suggestions?

werewolfwerewolf
You can still make a cross object formula field even if it is only a lookup and not a master-detail.
dbrunsdbruns
Thank you werewolf! To get specific, I am attempting to display a custom Lead field (Time_Zone__c) on its associated Activity Record. Is there an example that you might be willing to part with to help me with this?
werewolfwerewolf

Oh, no, that's not going to work.  Activity to Lead is not a normal lookup -- it's polymorphic.  That lookup can point to a lead, contact or person account, so you can't use formula fields across that.

 

Your only option then would be to write an insert/update Apex trigger on Activity to copy that field over if the Activity is pointing at a lead.

DBlondeauDBlondeau

Hello,

 

I have Account Name and Account ID Fields in 2 objects (Accounts and Contacts). The Account Name in the Contacts object is a lookup field. Is there a formula I need to make the Account ID auto populate when the Account Name is chosen?

 

Thanks

TGHTGH
I'm working on doing this in my org, but hopefully through a lookup field. I'm just trying to update a custom field on Opportunity Product to a custom field on Products. Is this possible? The objects are definitely directly related.