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

BC 22 OnPrem – Dependent App cannot see table extension field at runtime

(3) ShareShare
ReportReport
Posted on by 129

Hello everyone,

 

I am working with Business Central 22 OnPrem and I have a setup with three AL apps:

 
  • App1: defines the MycustomTable table
  • App2: extends the MycustomTable table by adding a new field MycustomField
  • App3: depends on App2 and needs to use the MycustomField field
 

In Visual Studio Code everything compiles fine. Dependencies are declared correctly (App2 → App1, App3 → App2) and symbols are downloaded without any errors.

 

When I publish the apps:

  1. I publish and install App1 and App2 via PowerShell:
Publish-NAVApp -ServerInstance BC220 -Path "C:\Apps\App2.app" -SkipVerification
Sync-NAVApp -ServerInstance BC220 -Name "App2" -Publisher "..." -Version 1.0.0.0 -Mode ForceSync
Install-NAVApp -ServerInstance BC220 -Name "App2" -Publisher "..." -Version 1.0.0.0
 

(I also confirmed with Get-NAVAppInfo that App2 is published, installed, and synchronized.)

  1. Then I publish App3 from VS Code.
  2. But at runtime, I get this error: MycustomTable table does not have MycustomField field
 

🔍 What I have checked

  • Dependencies in app.json are set up correctly.
  • Version numbers match the installed versions.
  • I used ForceSync and reinstalled App2.
  • Field IDs are consistent.
  • Symbols are refreshed in App3.
 

❓ My Questions

 
  • Is this a known runtime issue/limitation in BC 22 with chained dependencies and table extensions?
  • Could this be related to showMyCode or resourceExposurePolicy in App2 (I don’t have control over App2, it’s provided by another department)?
  • Are there any confirmed workarounds (other than using FieldRef)?

 

🙏 Any advice or references would be very helpful. I need to explain to my customer why this error occurs even though everything compiles fine.

Thanks in advance!

I have the same question (0)
  • Suggested answer
    Pallavi Phade Profile Picture
    236 on at
    BC 22 OnPrem – Dependent App cannot see table extension field at runtime
    Namaste T.Yaha ,
     

    What i could make out of above problem is - App3 is indirectly dependent on App1 and App2.

    Solution

    It is advisable to explicitly declare both dependencies (App1 and App2) in the app.json file of App3.

    By doing this, you ensure smoother publishing and installation, avoiding issues that can arise from indirect or missing dependencies.

    Please try this way 

    Publish and install App1.

    Publish and install App2

    Publish and install App3

    In many real-world scenarios, it is common to reference two or more dependencies directly to maintain stability and avoid dependency chain issues.

    If you feel this answer helpful , please verify the answer .

    Regards 
    Pallavi Phade
     
     
  • Suggested answer
    Nimsara Jayathilaka. Profile Picture
    71 on at
    BC 22 OnPrem – Dependent App cannot see table extension field at runtime
    The runtime error is a known limitation in BC 22, where dependencies on AL extensions with tableextension chains (or linked extensions) may compile correctly, but will fail at runtime if the intermediate extension App2 does not properly expose the extended fields.

    If App2 has no control of how the "MycustomField" is exposed, then it might be an issue of the "resourceExposurePolicy", or the wrong permission is set so that App3 cannot see that field at runtime, even though it compiles fine.

    I can confidently recommend a "workaround": Ensure that App2 properly exposes the extended fields (for example: using proper visibility attributes for marking the field, or using dependent codeunits to expose methods / properties). However, without the ability to change App2, "FieldRef" may be the only method to be able to access that field dynamically.

    In summary: This is a dependency and exposure issue in BC 22's extension model. Not a compilation issue. When relaying this to the customer, I suggest focusing on AL extension layers and the constraints in BC when it comes to field visibility at runtime.
     
     
  • Gerardo Rentería García Profile Picture
    22,730 Most Valuable Professional on at
    BC 22 OnPrem – Dependent App cannot see table extension field at runtime
  • Suggested answer
    Dr Gomathi MVP, MCT Community lead, MLE Profile Picture
    363 Super User 2025 Season 2 on at
    BC 22 OnPrem – Dependent App cannot see table extension field at runtime
    Hi Yahya,
     
    In Business Central OnPrem (v22), what you are seeing is not a compiler problem but a runtime behavior caused by how table extensions are resolved across dependent apps.
    Why it happens
    • Compilation vs. runtime: Visual Studio Code compiles fine because the symbols from App2 are downloaded correctly into App3. At compile time, App3 “knows” about MycustomField.
    • Runtime: At runtime, the server only exposes table extension fields to dependent apps if the extension publisher has allowed them to be visible. If App2 does not have the correct exposure settings (for example, showMyCode = true or an open resourceExposurePolicy), then the field exists in the database but is hidden from App3. This is why you see “table does not have MycustomField” even though it compiles.
    Known limitation
    Yes, this is a known limitation: chained extensions (App3 → App2 → App1) only work at runtime if the middle app (App2) explicitly allows its extended objects to be referenced by other apps. If it doesn’t, you are blocked, even though compilation looks correct.
    Possible causes in your case
    1. showMyCode: If App2 was published without showMyCode = true, its extended objects cannot be consumed.
    2. resourceExposurePolicy: If App2 has a restrictive exposure policy, App3 cannot see its fields at runtime.
    3. App install order/sync: Less common, but make sure App2 is fully installed before App3, and the same versions are in use.
    Workarounds
    • If you don’t control App2: you cannot directly access its field in App3 unless App2 is republished with correct exposure.
    • Technical fallback: using FieldRef and accessing the field dynamically works, because it bypasses the exposure restrictions. This is why you often see FieldRef suggested as a workaround.
    How to explain to the customer
    You can explain it like this:
    “The field is present in the database, but the way Business Central handles chained extensions means that App3 cannot consume it unless App2 explicitly allows it to. This is a design decision in BC to give publishers control over what dependent apps can use. The only options are for App2 to be republished with showMyCode/exposure enabled, or for App3 to use dynamic references such as FieldRef.”


     

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,708

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,675 Super User 2025 Season 2

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans