+ Start a Discussion
ganeshjujjuruganeshjujjuru 

How can i restrict related list based on profiles in Visualforce page

How would like to know how can i restrict related list based on profiles in visualforce page.Can u  please give me small example for this.

IspitaIspita
What do you mean by "restricting related list"
Is it:-
1. Showing / Hiding a particular related list based on profile , in that case create different page layouts for the profiles in questions add / remove the related lists as per you your requirement and then assign the respective page layouts to the designated profiles.
2. By restricting related list are you referring to the conditional showing of data - that I think is taken care of by the security model.
Does it answer your query , if yes do mark it as a solution.
Thanks
ganeshjujjuruganeshjujjuru

i want this scenario in visualforce page. Is it suitable for this

IspitaIspita
Via visual force you can achieve almost anything , its only via Standard functionality that you face limitation.
In case you need further clarification feel free to add to this thread.
skodisanaskodisana
Hi,

Do not give Read access to the Object from the Profile.
Then it will not display in the related list and also anywhere in the system.

Thanks,
Srikanth. K