web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

You do not have the following permissions on CodeUnit ... Execute

(2) ShareShare
ReportReport
Posted on by 833

I've deployed an AL extension to a BC V20 On-Prem system. In the extension there's a permissionset.al file generated using 'AL: Generate permission set as AL object containing current extension objects' facility in in Visual Studio Code. One of the permissions described in this AL file is: 'codeunit CustomTrialBalancePopulator=X,' . I have assigned this permission set in the User Card of the current user and logged out of BC and back in again. Why then am I getting the error: You do not have the following permissions on CodeUnit CustomTrialBalancePopulator: Execute?

Interestingly, the pages and tables also described in the permission set are successfully displayed

Version: GB Business Central 20.0 (Platform 20.0.37114.38150 + Application 20.0.37253.38230)

Here's the permission set:

permissionset 50000 CustomFuncsYW
{
Assignable = true;
Permissions = tabledata TrialBalanceByDim=RIMD,
tabledata TrialBalByDimParams=RIMD,
table TrialBalanceByDim=X,
table TrialBalByDimParams=X,
report CustomTrialBalanceByDim=X,
codeunit CustomTrialBalancePopulator=X,
page TrialBalanceByDim=X,
page TrialBalByDimParams=X,
query GleDv1=X;
}

I have the same question (0)
  • Nick Webb Profile Picture
    833 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    I left the Company column of the permission set blank. My understanding is, that means it applies to all companies.

  • Suggested answer
    pankaj.k Profile Picture
    994 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    Hi Nick,

    if you are using any Customize Codeunit then also define the permission in the codeunit.

  • Suggested answer
    DAnny3211 Profile Picture
    11,376 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    hi

    look this

    community.dynamics.com/.../you-do-not-have-the-following-permission-on-codeunit-loginmanagement-execute

    DAniele

  • Suggested answer
    YUN ZHU Profile Picture
    92,656 Super User 2025 Season 2 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    Hi, just adding some info.

    If you confirm permissions are fine, it could also be a license issue, such as object range.

    And, please note whether it has something to do with Universal code.

    https://yzhums.com/30559/

    Hope this helps.

    Thanks.

    ZHU

  • Nick Webb Profile Picture
    833 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    The ID of my codeunit is: 50001 (as below)

    codeunit 50001 CustomTrialBalancePopulator

    Are these the relevant lines from the FLF licence file:

    Module                 From  To    Type              Permission
    MS AL Only Development 50000 99999 Codeunit          - - M D -
    MS AL Only Development 50000 99999 Page              - - M D -
    MS AL Only Development 50000 99999 Query             - - M D -
    MS AL Only Development 50000 99999 Report            - - M D -
    MS AL Only Development 50000 99999 TableDescription  - - M D -
    MS AL Only Development 50000 99999 XMLPort           - - M D -

    Should there be an 'X' in the last position of the Permission column?
    (e.g.)

    MS AL Only Development 50000 99999 Codeunit          - - M D X

  • Suggested answer
    pankaj.k Profile Picture
    994 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    0652.permission.PNG

    Add this permission in codeunit Property also.

  • Nick Webb Profile Picture
    833 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    I've added the permissions lines below to my CodeUnit and it didn't make any difference. Same error.

       Permissions = TableData TrialBalByDimParams = rimd,

                     TableData TrialBalanceByDim = rimd,

                     TableData "G/L Account" = r,

                     TableData "G/L Entry" = r,

                     TableData "General Ledger Setup" = r,

                     TableData "Dimension Value" = r,

                     TableData "Accounting Period" = r;

    Does this mean it's licence related?

  • Nick Webb Profile Picture
    833 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    In Effective Permissions the 'Execute Permission' column does not contain 'Yes' for my CodeUnit (see below). Is this incorrect?

    Screenshot-2022_2D00_12_2D00_23-144746A.png

  • Suggested answer
    pankaj.k Profile Picture
    994 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    i think you have license issue.

    Please check with your partner....

  • Suggested answer
    pankaj.k Profile Picture
    994 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    share your codeunit code i will check in my system.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,232

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,863

#3
Sumit Singh Profile Picture

Sumit Singh 2,819

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans