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
SimrinSimrin 

Populate a list depending on other list dynamically

I have below Usecase

I have a Master detail relation.
I have Two pages displaying list of objects.

Page1 - Displaying list of Oject1 and Object 2

pageblocktable (Displaying List of Object A and List of Object B, Columns in Object B are dependent on values of Object A)
Column1A | Column2B | Column2C | Column2D 

Page2 - Displaying list of Oject2 (No problem is this one)

Object1 (Detail)
-Column1A Text
-Column1B Picklist(Controlling)
-Column1C Picklist(Dependend on Column1B)
-Column1D LookupUser

Object2 (Master)
-Column2A //Want it same as Column2A
-Column2B Picklist(Controlling)  //Want it same as Column2B 
-Column2C Picklist(Dependend on Column2B)
-Column2D                        

Is it feasible to do ?
If so what are logical steps ?
Best Answer chosen by Simrin
SimrinSimrin

My requirement was

-Column2A //Want it same as Column1A
-Column2B Picklist(Controlling)  //Want it same as Column1B 

In visual force page, I detect which value is displayed and based on that I display a dynamic list.

Which list will be displayed is decided from front end and the values comes from backend.

 

 

All Answers

fundooMentalfundooMental
Question is not clear. In Object2 you have written Column 2A/Want it same as Column 2A?
SimrinSimrin
Object1 (Detail)
-Column1A Text
-Column1B Picklist(Controlling)
-Column1C Picklist(Dependend on Column1B)
-Column1D LookupUser

Object2 (Master)
-Column2A //Want it same as Column1A
-Column2B Picklist(Controlling)  //Want it same as Column1B 
-Column2C Picklist(Dependend on Column2B)
-Column2D          
SimrinSimrin
Sorry for mistake
SimrinSimrin
I could use query to query object1 And populate for object2, but i cant mâke out How could i get à perfect list And display thèm in correct fashion. I may be ambigous. But some guidance to start Will be good
fundooMentalfundooMental
You can just write a trigger on the detail object which would fire on after Insert or after Update and in this trigger populate the fields on Master object same as detail object.
fundooMentalfundooMental
Please care to reply if the issue is solved/not solved/ you got best answer etc after posting the question as it will help the community members to find the relevant solution and also all those replying for the question would come to know that this qustion has been solved.
SimrinSimrin

My requirement was

-Column2A //Want it same as Column1A
-Column2B Picklist(Controlling)  //Want it same as Column1B 

In visual force page, I detect which value is displayed and based on that I display a dynamic list.

Which list will be displayed is decided from front end and the values comes from backend.

 

 

This was selected as the best answer