Hi All,
I have been trying to build one page extension based on permission set. I was able to block the field from Items Lookup page but it still shows the field in drop down but when open the full screen it doesn't show the hidden field.Below is my code:
pageextension 50110 ItemCardExtension extends "Item Lookup"
{
layout
{
modify("Unit Price")
{
Visible = isSecurityUser;
}
}
var
isSecurityUser: boolean;
trigger OnOpenPage();
var
AccessControlRec: Record "Access Control";
begin
isSecurityUser := true;
AccessControlRec.reset();
AccessControlRec.setfilter("User Security ID", USERSECURITYID);
AccessControlRec.setfilter("Role ID", 'SUPER');
If not AccessControlRec.findset() then
isSecurityUser := false;
end;
}
Below are the screenshots. If I click on the drop down to select the item it shows "unit price" (hidden field) but If I click on Select from full list on the drop down,it doesnt show Unit price field