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
Troy TurleyTroy Turley 

we have lookup relationship from custom object to the opportunity and with the help of visual force page or trigger I want to show both objects records in each other’s related list.

Although i have not yet built a trigger, it is someonething i feel comfortable doing if someone can help me get started.
Troy TurleyTroy Turley
The opportunity will actually have multiple child records. Use Case: From case products are associated with Case. "checkbox" is RMA gets checked 

Product on RMA related list - The desired behaviour when creating opp from RMA, includes products in the related list. - next screenshot. - not RMA record type is chosen, but not shown in screenshot due to screenshot threshold.
Pick RMA record type 

As you can see the RMA does associate with new opp- interestingly enough the new opp shows no association to the RMA. However, when going to RMA the opp association shows.
however newly created opp doesn't show rma association and show no products

The desired behavior: when creating an opportunity from RMA that has products, Opportunity automatically pulls in products from RMA and shows the associated RMA on the opportunity side.
case is rma

product on RMA from auto create

newly created opp from RMA with association.
The desired behavior: when creating an opportunity from RMA that has products, Opportunity automatically pulls in products from RMA and shows the associated RMA on the opportunity side.

however newly created opp doesn't show rma association and show no products
The desired behavior: when creating an opportunity from RMA that has products, Opportunity automatically pulls in products from RMA and shows the associated RMA on the opportunity side.



 
Naval Sharma4Naval Sharma4
Hi Troy.

What kind of relationship will it be?
  • Many-to-Many between Opportunity and Cusotm Object ( n:n )
  • One to Many between Opportunity and Custom Object ( 1:n )
You can achieve both things even without a visualforce page. Do you have a specific use case for the VF page?
Troy TurleyTroy Turley
It will be many to many.