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
starlightstarlight 

how do i connect two junction objects?

hi,
I need to connect two junction object.
One is opportunity product and the other junction object is related to my custom object.
Is it possible to connect these two junction objects to each other using VF page/apex??
 
Anmol Kumar 24Anmol Kumar 24
In Order to show rlated data from one junction object under another you need to have a way to identify the relation between the two junction objects (how are te two junction object related).

Once you have answer to relation between the two objects you can display the depending on the relation:
  • If the relation is a direct one to many: use the standard related list to display data.
  • If the relation is based on some custom field(Let's say any two records with a unique field are related): Use apex class to query the related records and display it using either Vf page of Ligtning component.
starlightstarlight
thanks Anmol...