0

I would like to display a few additional custom fields that are only related to 1 or 2 contacts accessing my portal, only they should be able to see these additional fields. How can I acheive this?

2
  • Those 2 contacts have same profile? – tandonprateek Jul 11 '14 at 10:07
  • @tandonprateek Yes, but so do all the other contacts. – Deployment Failure Jul 11 '14 at 10:10
0

Ok if those 2 contatcs have same profile then you can create 2 page layouts in one page layout have the fields which you want to show to show those contatcs and assign the page layout to that profile which is shared by those two contacts and create another layout which do not contain those fields and assign this layout to different contacts.

I hope this will resolve your problem.

3
  • Although this is the answer to my question, is there any other ways to implement this? The reason I ask because I do not want to have to update and maintain multiple profiles for users of the Portal, it will be especially tedious when there are a dozen profiles for each type of user – Deployment Failure Jul 11 '14 at 11:15
  • OK ... The other way may be you can try to make a custom setting, store for which profiles you want to show the fields and then in controller maintain a flag and then you can check if the current logged in user profile exist custom setting then make flag that true and show fields on VF page and if not contains then mark the flag as false and hide those fields. – tandonprateek Jul 11 '14 at 11:25
  • Ah from what I can see I dont even need to create a new page layout for each user, I can simply use the same layout and the user specific fields will simply be hidden from unauthorised users. – Deployment Failure Jul 11 '14 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.