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
Susy FongSusy Fong 

I created a custom object to relate 2 of the same objects. However, it creates two separated related lists as below. Is there an apex trigger to merge the two related lists into one?

I created a custom object to relate 2 of the same objects.  However, it creates two separated related lists as below.  Is there an apex trigger to merge the two related lists into one?

User-added imageUser-added image
Raj VakatiRaj Vakati
If you have two different objects.. then it will show as a two related lits ..( and Merging with the trigger is not possible ) 

Here is the simple solutions 
  1. Merget Both the objects in only one object and add all the fields to one objects only 
  2. Create two record types on the same object like Current client relation and exciting client relation 
  3. Move the data into this new object with record types 
  4. and Delete the second objects 
Susy FongSusy Fong
Thank you for your solution. I will try it and sees it works for me, thanks again for your prompt reply☺ SUSY FONG | Corporate Administrator P: 416.322.8000 F: 416.322.8800 E: susyq@bosleyrealestate.com Bosley Real Estate Ltd., Brokerage | www.bosleyrealestate.com 169 Danforth Avenue, Toronto ON, M4K 1N2 [Bosley Logo for E Sig] Facebook | Twitter | LinkedIn | Instagram