Meant to put this in the technology section but cant see how to change it
Hi @chrisplant ,
You won’t be able to do this through a permission set along as the insert/update privilege cannot be controlled on a per field way. I think your best bet would be to use a custom event with the type SQL to do this and raise an error message when a user how is not suppose to update this specific field tries to update it. You can do your validation on who can update and who cannot, in the SQL block it self (i.e. users who are granted a specific dummy permission set can update the field) .
Cheers
This is an example of such an event, this is for Dutch and English.
BR/MR10
DECLARE
Is_Prop_Auth_ VARCHAR2(5) := ifsapp.Posting_Prop_Auth_Util_API.Is_Proposal_Authorized('&NEW:COMPANY',&NEW:INVOICE_ID,1);
USRLANG_ VARCHAR2(55) := '#USER_LANGUAGE#';
MSGNL_ VARCHAR2(200) := ‘XXX.';
MSGENG_ VARCHAR2(200) := ‘XXX ';
role_ NUMBER:=0;
CURSOR get_role
IS
SELECT COUNT(1)
FROM ifsapp.fnd_user_role f
WHERE f.role IN (XXX)
AND f.identity = ifsapp.fnd_session_api.Get_Fnd_User;
BEGIN
IF ifsapp.fnd_session_api.Get_Fnd_User <> 'IFSAPP' THEN
IF '&NEW:PARTY_TYPE' = 'SUPPLIER' THEN
OPEN get_role;
FETCH get_role INTO role_;
CLOSE get_role;
IF role_ = 0 THEN
IF '&NEW:AUTHORIZED' = 'TRUE' AND Is_Prop_Auth_ = 'FALSE' Then
IF USRLANG_ = 'nl' THEN
Error_SYS.Appl_General('FOUT',MSGNL_);
ELSE
Error_SYS.Appl_General('ERROR', MSGENG_);
END IF;
END IF;
END IF;
END IF;
END IF;
END;
Thanks, I did have a quick look at creating a custom field based on membership of an admin usergroup.
NVL(user_group_user_api.get_objkey('9C9D1908B38A49688B7B01C9624768C5',FND_SESSION_API.Get_Fnd_User),0)
And I then created a conditional field with a read only value which checks if the custom field is 0.
This works well but i then couldn’t see howto restrict someone removing the conditional field check.
In the end, I set the field to read only in the form properties. I then created a couple of custom menus that set the field to different values. The code checked to see if the current logged in user was a member of a specific user group.