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
Amita TatarAmita Tatar 

display related list based on picklist value

Hi guys,

Can we display a related list based on some picklist value. Like i have opportunity standard object and equipment as a custom object.
In opportunity picklist i have three values. i want to display equipment related list on selection of a particular value. How can we do that?
sslodhi87sslodhi87
Yes you can do that by appying the filter on the bases of Opportunity picklist value.

Please share your code here.. I can help you

Thanks
 
Amita TatarAmita Tatar
do i need to write a trigger for that?
Amita TatarAmita Tatar
can u help me with the code?
Dutta SouravDutta Sourav
Hi Amita,

I don't think Trigger is needed to achieve that.

Use <apex:relatedList> on VF Page.

Here is a sample code:
<apex:relatedList list="child relationship_name" rendered="{!IF(CONTAINS(Opportunity.picklist_api_name,'Picklist_Value'), false, true)}"/>



Kind Regards,
Sourav.