Skip to main content

Notifications

Announcements

No record found.

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

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

Posted on by 674

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;
}

  • Suggested answer
    CU29050734-0 Profile Picture
    CU29050734-0 2 on at
    You do not have the following permissions on CodeUnit ... Execute
    I had this problem and it was a license issue. I had to get details of what objects were assigned to the license.   The object number you are using may have not been assigned yet.
    The objects are not only purchased, but then assigned to specific number ranges:
     
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    At this stage i think I would recommend you to open a support case with Microsoft so they can check your license and your permissions.

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

    Just as a diagnostics step I created and installed a completely new extension that just displays a message in a codeunit:

       procedure ShowMessage()

       var

       begin

           Message('This is a test message.');

       end;

    It's producing the same error:-

    TestMsg_5F00_Error_5F00_20230113.jpg

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

    Did anybody have time to look at the code I shared and determine if there are any issues?

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

    I have tried uninstalling and re-installing the extension, and it didn't change anything. Same error. A piece of additional info has come to light that there is another extension, completely unrelated, that has also stopped working since the new licence was installed with same error for a different codeunit.

    RecurringInvoices_5F00_Error_5F00_20230113.jpg

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

    Thanks for the suggestion. At the moment we're going to attempt to regenerate the licence. If that doesn't work I'll certainly try uninstalling and re-installing the extension.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    Have you tried to re-install the extention?

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

    Yes, see screenshot below.

    LicenceSnapshot4YW.jpg

    Do the license screenshots I posted yesterday look correct? The Licence Permissions page doesn't show Execute: Yes for Codeunit 50001? Neither does the Effective Permissions page below:

    LicenceSnapshot5YW.jpg

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: You do not have the following permissions on CodeUnit ... Execute

    Have you added the correct permission sets to the users?

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

    And here's another relevant screenshot:-

    pastedimage1672937153036v1.jpeg

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans