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

Custom Codeunit Error: current permissions prevented the action

(1) ShareShare
ReportReport
Posted on by 4
I've created a codeunit to update the item journal and get the following error:
Sorry, the current permissions prevented the action. (CodeUnit 70000 CodeUnitName Execute: )  CorrelationId:  18cb24de-c54e-4678-ac89-309148d4c82d.
I've generated a permissionset.al, uploaded it and assigned the permissions to the API user and still get the above error.
 
Is this all that is needed in the permission file?
permissionset 70000 INTERNALNAME
{
    Assignable = true;
    Permissions = codeunit CodeUnitName = X;
}
 
Thanks!
I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,137 Super User 2025 Season 2 on at
    Custom Codeunit Error: current permissions prevented the action
    if you are using other objects then you should add that in permission set.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,311 Super User 2025 Season 2 on at
    Custom Codeunit Error: current permissions prevented the action
     
    I think you're using other codeunits and other objects, so you should add them to the permissionset.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • ND-19090211-0 Profile Picture
    4 on at
    Custom Codeunit Error: current permissions prevented the action
    Thanks for the suggestion Khushbu, but I have already generated the permission file as per the link you shared and assigned it to the user.
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,137 Super User 2025 Season 2 on at
    Custom Codeunit Error: current permissions prevented the action

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
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 4,220

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,958

#3
Sumit Singh Profile Picture

Sumit Singh 2,961

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans