microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
719 stars 242 forks source link

Unexpected warning AL0697 when an object is added to an entitlement through a permissionsetextension #7712

Open Jeeve65 opened 2 months ago

Jeeve65 commented 2 months ago

1. Describe the bug We have an app that uses entitlements. Entitlements reference PermissionSet objects, and PermissionSet objects can be extended using PermissionsetExtension objects. Now, we have an object in a permissionsetextension object that extends a permissionset that is part of an entitlement. Here we get warning AL0679 that the object is not included in any entitlement.

2. To Reproduce Steps to reproduce the behavior: Create the following objects in a new app:

codeunit 50100 "AL0697 issue 1" { } codeunit 50101 "AL0697 issue 2" { } permissionset 50100 "AL0697 issue" { Assignable = true; Permissions = codeunit "AL0697 issue 1" = X; } permissionsetextension 50100 "AL0697 issue extension" extends "AL0697 issue" { Permissions = Codeunit "AL0697 issue 2" = X; } entitlement "AL0697 issue" { Type = Unlicensed; ObjectEntitlements = "AL0697 issue"; }

3. Expected behavior No warning

4. Actual behavior Warning AL0697 is shown: The application object 'Codeunit "AL0697 issue 2"' is not included in any entitlement and will therefore not be accessible in the cloud.

5. Versions:

BazookaMusic commented 2 months ago

Another bug with objects and extensions in the same app