Hi Subrahmanyam, To do what you're asking about you'd need to create a Dynamic Visualforce Component based on the $User.Profile: Try the following code: Component.Apex.OutputText renderButton = new Component.Apex.OutputText(); renderButton.expressions.value = '{!IF($User.Profile == "NameofUserRequiredProfile", "True", "False")}';
Please refer to the following link : https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_components_implementation.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
To do what you're asking about you'd need to create a Dynamic Visualforce Component based on the $User.Profile:
Try the following code:
Component.Apex.OutputText renderButton = new Component.Apex.OutputText();
renderButton.expressions.value =
'{!IF($User.Profile == "NameofUserRequiredProfile", "True", "False")}';
Please refer to the following link :
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_components_implementation.htm
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha