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
Josh GitogoJosh Gitogo 

How to put records of a Master to Child to Master record

Hello, I am not enitrely sure how to word this but I am currently trying to create a VisualForce page that pulls up a data from a child record of a seperate master record that is connected using a junction object. Below I have attached the relationship that exists:User-added image
The Object Solesence Product is the "Parent" of Ingredient use level and is connected to Ingrediants which is also the parent of Ingredient Use Level. I currently have a VisualForce page that pulls up Fields of Ingredient on a standard controller of Solesence Product here is the code for it below
<apex:page standardController="Sol_sence_Products__c">
   
<h1>Solesence Inventory List</h1>
    
   <!-- Solesence Inventory List -->

<table style="border: 5px solid black;" width="100%">
<tr style="border: 5px solid black">
    <th Style="text-align: center; border: 1px solid black;border-collapse: collapse">Ingredients</th>
    <th Style="text-align: center; border: 1px solid black;border-collapse: collapse">INCI Name</th>
    <th Style="text-align: center; border: 1px solid black;border-collapse: collapse">Chemical Name</th>
    
</tr>
        <apex:repeat var="Ingredient_Use_level__r" value="{!Sol_sence_Products__c.Ingredient_Use_levels__r}" >
        <tr style="border: 15px solid black">
            <td Style="text-align: center; border: 1px solid black">{!Ingredient_Use_level__r.Ingredients__r.Name}</td>
            <td Style="text-align: center; border: 1px solid black">{!Ingredient_Use_level__r.Ingredients__r.INCI__c}</td>
            <td Style="text-align: center; border: 1px solid black">{!Ingredient_Use_level__r.Ingredients__r.Composition_Ingredient__c}</td>
    </tr>
</apex:repeat>
</table>
    <a href="history.back();" onclick="history.back();">Back To Previous </a>
</apex:page>

However, I need to pull up records from Composition which is the child of Ingredients. Does anyone know how to do this?