BusinessCentral.LinterCop icon indicating copy to clipboard operation
BusinessCentral.LinterCop copied to clipboard

LC0068 on tableextension object

Open Arthurvdv opened this issue 5 months ago • 25 comments

To verify this, is there a way to assign permissions in the scenario below?

tableextension 50100 MyCustomer extends Customer
{
    procedure MyProcedure()
    var
        ShiptoAddress: Record "Ship-to Address";
    begin
        ShiptoAddress.SetRange("Customer No.", Rec."No.");
        ShiptoAddress.FindFirst(); // The current object is missing permission "r" for tabledata "Ship-to Address" (LC0068)
    end;
}

I thought of adding the InherentPermissions Attribute, to the method like this: [InherentPermissions(PermissionObjectType::TableData, Database::"Ship-to Address", 'r', InherentPermissionsScope::Permissions)] ... but that raises another error An application object 'Table 222' could not be found in the current extension. Only application objects that belong to the current extensions can be used in this context. AL0720.

Arthurvdv avatar Sep 12 '24 08:09 Arthurvdv