I have 2 requirements on the Users Records.
- Hide fields on the user form if a user is editing their own USER record
- Set all fields read only if you ARE NOT the User OR you ARE the Users Manager OR you belong to the Corporate Group
I have tried several different paths, including setting sessions variables, hiding the fields and using conditions to show. I can not get anything to work. Any help would be appreciated. Below are a few examples of the many I have tried.
if ($values["email"] == ':session.UserID'){
$pageObject.hideField("mgr_name");
$pageObject.hideField("is_manager");
$pageObject.hideField("user_type");
---------------------
if ($values["email"] == " . Security::getUserName()"){
$pageObject.hideField("mgr_name");
$pageObject.hideField("is_manager");
$pageObject.hideField("user_type");
------------------
if ($data["email"] == " . Security::getUserName()"){
$pageObject.hideField("mgr_name");
$pageObject.hideField("is_manager");
$pageObject.hideField("user_type");