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
snubby2929snubby2929 

Cross Object Field Copy

How can I move data from one object to another?  Example, I have a formula field on the child that has a formula value of 4, I want to copy that field value to the parent and display it on the same field name on the parent.  

Steve :-/Steve :-/

If they have a Master-Detail relationship, you could create a Rollup Summary (RS) field on the Parent that returns the COUNT of child records.  Then create a formula field the evaluates the RS field and retrns a 4 if the RS COUNT > 0 

DaFFyDaFFy

I'm actually looking to do something similiar but it's off a picklist that's not in a master detail relationship. I basically want to move a value from a picklist from the user object to the opportunity object. Any help would be appreciated. 

Steve :-/Steve :-/

DaFFy

how are you accessing the User object from the Opportunity object?

DaFFyDaFFy

I was trying different things but kept getting syntax errors. I tried to create a formula field to try to capture the data, but kept running into errors.

Steve :-/Steve :-/

can you post a screenshot of your Formula and the error message?

DaFFyDaFFy
isPickval($User.Office__c,"null")

 I had that as the code and the error message i received when i click on check syntax is:

 

Error: Formula result is data type (Boolean), incompatible with expected data type (Text)

 

 

Steve :-/Steve :-/

are you trying to write a Validation Rule a Formula Field, or something else?

DaFFyDaFFy

Not a validation rule. I'm trying to create a field that would copy over what the value is from the picklist of another object.

 

Here's the situation.

 

On the user object there's a picklist called Office with East, West, Central as the values. Whichever value is picked from that user's page is what i would like to copy into the opportunity owned by the user.

 

Apologies on the lack of clarity in my previous post, but hopefully the above situation clears it up a bit.

Steve :-/Steve :-/

Okay you can't do that with a Formula Field, you'll need to use an Apex Trigger.  You should probably repost this on the Apex discussion board (this one is just Formulas and VR's)

DaFFyDaFFy

Will do. Thanks Stevemo