Hello,
MY object:
To Hide the' Document Sending Profile' field on the Customer Card (Page 21) only for users with the profile ID 'Inventory Manager'.
I am using the Following Code in VS code. The code is showing no errors but its not effective. when i logged in as an 'Inventory Manager' i still can see that field.
Can someone kindly help me out on this.
I am using the following code:
pageextension 50100 HideDSPField extends "Customer Card"
{
layout
{
modify("Document Sending Profile")
{
Visible = ShowField;
}
}
var
ShowField: Boolean;
trigger OnOpenPage()
var
UserPersonalization: Record "User Personalization";
begin
// Default to visible
ShowField := true;
// Check current user's profile
if UserPersonalization.Get(UserId) then
if UserPersonalization."Profile ID" = 'Inventory Manager' then
ShowField := false; // Hide for Inventory Manager
end;
}