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
Hary464Hary464 

How to vary a Vf page based on portal user role

HI friends,

 

In my application i have requirement for one visulaforce page like if supervisor logins,need to display the entire header component of the page along with the managers records and the employees under that manager.if manager logins,need to display all the employees under him and if employee logins,no need to show the header.

 

 

Please help me..i am unable to write the SOQL query to fetch id's.

kiranmutturukiranmutturu
i think if you can identify the role in the page load based on that you can render the components according to that.. right?

so make use of rendered attribute and male use of $userrole.name == 'Superviosr role name' then display what ever you want else hide what ever components u want to hide.....