Announcements
Hi,
I have requirement for editing some field only for three or 4 users.
I know i can use personalization and security filter but it has multiple permission given to user which will overwrite the security filter
how can I achieve this using customization?
:) Thanks for your help.
Hi, just adding some simple examples.
Hope this helps as well.
Thanks.
ZHU
More refine code on top of Vaishnavi Joshi
trigger OnOpenPage()
var
Rec_UserSetup: Record "User Setup";
begin
Clear(Rec_UserSetup);
Rec_UserSetup.get(UserId);
CheckEditable:= Rec_UserSetup.AllowEditable // AllowEditable is boolean field in User setup table.
end;
Hi,
you can create a boolean field in user setup.
set it true.
Then write this trigger onOpen Page
layout
{
area(content)
{
group(General)
{
field("Name", Rec."Name")
{
Editable = CheckEditable; //Assign the value to editable property of field
}
}
}
}
trigger OnOpenPage()
var
Rec_UserSetup: Record "User Setup";
begin
Clear(Rec_UserSetup);
Rec_UserSetup.Reset();
Rec_UserSetup.SetRange("User ID", UserId);
if Rec_UserSetup.FindFirst() then
CheckEditable:= Rec_UserSetup.AllowEditable // AllowEditable is boolean field in User setup table.
else CheckEditable:= false;
Var CheckEditable : Boolean // Global field
If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much
André Arnaud de Cal...
294,125
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator