Indirect Permissions in Business Central AL — Permissions Property Explained

Опубликовано: 14 Июль 2026
на канале: Stefan Maron
353
10

Indirect permissions in Business Central are a license-level restriction that controls which tables can only be written to via code — not directly by users. When you hit a runtime error like "IndirectTableAccess" on a table such as Sales Invoice Header, it has nothing to do with the permission sets assigned to the user. It means the table is license-restricted and your code needs to declare the access explicitly.

The fix is the `Permissions` property on a codeunit (or page). Setting `tabledata "Sales Invoice Header" = i` tells the runtime that the codeunit is allowed to perform indirect inserts on behalf of the calling user. Without it, even SUPER users will hit runtime errors when your extension tries to write to a restricted table. The distinction between direct (`I`) and indirect (`i`) matters — you cannot use this property to bypass license restrictions, only to satisfy them.

This stream also covers inherent permissions, how the `Sent Email` table enforces indirect read permissions, why the developer license hides these errors locally but not in customer environments, and how `TestPermissions = Restrictive` in your AL test codeunits catches these issues before they reach production.

Streaming all kinds of coding for Microsoft Dynamics 365 Business Central.
Join me to just hang out or tell me what I am doing wrong ;)

Join me live and let's build this together.

📝 Blog post: https://stefanmaron.com/posts/indirec...

====== Content of this Video ======
0:00 - Introduction to the BC Coding Stream
1:45 - Getting Started: Indirect Permissions
3:42 - Publishing and Error Handling
5:00 - Overview: Effective User Permissions
6:13 - Code Unit Permissions Explained
9:00 - Permission Set Creation
11:00 - Using Code Units for Indirect Permissions
13:52 - Working with Indirect and Direct Permissions
15:03 - Permissions Property Insights
17:00 - Exploring Inherent Permissions
19:49 - Reading Permissions and Licensing Restrictions
21:22 - Testing Code Unit Permissions with Send Mail
24:23 - Consistency in Permissions Across Objects
26:00 - Best Practices for Permission Settings
27:31 - Exploring Page Permissions and Their Limitations
29:15 - Testing Permissions on Pages
31:03 - Corrections and Additional Insights on Permissions
33:02 - Practical Examples and Discussion
35:00 - Introduction to Cosmo Alpaka and Development Tools

About Me:
https://stefanmaron.com/

Music by:
   / @streambeatsbyharrisheller  
https://open.spotify.com/artist/6GTRL...