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
RRRizeRRRize 

Display fields from Opportunities on my custom object.

Greetings.  I was wondering if it is possible to display fields from Opportunities in a custom object I created.  I posted here on DevForce because I'm not a developer but have a feeling formulas may be involved?  But not sure.  Any insight will be appreciated.

SherriASherriA

Sure, I have Opportunity fields that show up on my custom objects (assuming the opportunity and the object are linked, of course).  If you use the advanced formula builder and click on the "Insert Field" button you'll get a list of fields.  If there is a > symbol after the field you'll have more fields available for that choice.  In the screenshot below you can see how its laid out:  

 

 

 

Here's an example of a formula field on my custom object "Visit Request" that pulls the RAD date from the Opportunity:  

 

 

You can do more complicated things with them, of course, but if all you want to do is display the value of a field from your opportunity on your custom object, its as easy as that.  

RRRizeRRRize

I've done this but when I go to the Advanced Formula Builder I see my custom object (Execution Form) and all the fields in it.  What I want to see is my Opportunity object instead.  If I manually attempt to create the formula (ex: Opportunity__r.Sales_Representative_c) I get an error that states that Opportunity__r does not exist.

 

I'm guessing I get this error because SF does not see the link between my custom object and Opportunities, but they are linked - at least I think so.  To create a link between the two objects I just need to create a lookup field relating them, correct?

 

BTW, thank you for your response!

SherriASherriA

One of the fields on your customer object should be your Opportunity with a ">" symbol next to it.  If you select that, you should get a new set of fields to the right that are the fields on your opportunity.  

JayantJayant
Possibly you have created the Look-Up field on Opportunity object rather than the Custom Object (if you already created it and can't see Opportunity fields on your Custom Object in Formula Builder). Kindly verify. We can see the fields on Parent on a children object but vice-versa isn't true. In your scenario, the look-up field needs to be created on the Custom Object which is related to Opportunity object. Thanks a lot.