Hide Fields on PeopleSoft Page for Some Users

Sometimes you would like to hide fields from some users and not others. The only way that I know of is by creating a new role and assigns it to users who should not be seeing the fields.

This is how to go about doing that:
1. Create a role and add the users that should not see the fields to this role. The role doesn't have to have any permission list(s), although it could if you want to, it really doesn't matter for what we are trying to do here.
2. In the page.activate PeopleCode event, right some code to test if the user opening the page is in that role. If so, then hid the fields.

There is a delivered PeopleSoft function that checks if a user has a specific role