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
SarbelloSarbello 

Custom object with relationship back to itself / Listview columns

This should be easy but...

 

I have 2 custom objects – "Product" and "Related Product".

 

"Product" has fields that include Price, Category, Description, etc..


"Related Product" only has a single field – master-detail back against "Product".
Also it has an Auto Number field for the Name – I did this so that the user would only have to select a related product and not have to type some other data in.

 

On the tab "Product" I get a related list of "Related Products" but the listview only shows
the auto number (ie: RP-0001). I want to add more fields to the listview on the "Product" tab but when I go to the Page Layout on the "Product" object and click the wrench on the related list I have no other field that would be meaningful to include.

 

OK – so I go back to "Related Product" object and add a Formula field and indeed this formula field shows up on the "Product" tab – page layout – "Related Product" related list - wrench area.

 

The issue is creating the formula field – nothing I select (fields to include) allows me to get the name of the product the user selected (on the "Related Product". Its always a cryptic ID or the Product name of the parent or something else.

 

Any ideas?

 

Thanks - Dave

wchristnywchristny

Instead of creating a second custom object for "Related Product", have you tried adding to your "Product" custom object a custom lookup relationship field ("Parent Product") pointing to "Product" ?  This should allow you to add a "Related Products" related list to the Product page.  Since the relationship points to a Product record, you should have all of the Product fields available to display in the related list.  The parent product's page should list all of the related child products in this related list.

 

This is the same concept used to relate an account to a parent account.

 

You should check this angle out and see if it meets your needs.