Extension dependencies

vaprogvaprog Member Posts: 1,136
I have some trouble designing an extension in AL.

My extension uses a field of a certain table in it's code (which happens to be in the OnPreReport trigger of a reportextension object) [App 3].

The field is defined in a tableextension object in a different app [App 2].
The table is defined in yet another app [App 1].

I defined the dependencies to [App 1] and [App 2] in App.json.

The IDE resolves all symbols and does not show any warning or error in the editor. I can generate the app using Build... (SHIFT+CTRL+B).

I cannot run the object with or without the debugger in the sandbox (F5 / CTRL+F5), and I cannot install the app by uploading it. In either case I get the error
AL0132: 'Record "Item Lifecycle Status"' does not contain a definition for 'Completely Blocked'
where "Item Lifecycle Status" is the table defined in [App 1] and "Completely Blocked" the field defined in [App 2].

Is there anything I can do to get the compiler recognize the field as the editor does?

Answers

  • markborgesmarkborges Member Posts: 170
    I have seen this happening a few times, and sometimes restart VS Code, and sometimes re-creating my local repository kind of solved the issue.

    I never found a real solution or the real reason behind it.
    Marcelo Borges
    D365 Business Central Solutions Architect
    BC AL/NAV C/AL Developer
    BC Repositories.com
  • vaprogvaprog Member Posts: 1,136
    Hi,

    thanks for your report.

    What do you mean by re-creating the local repository? I have tried re-downloading symbols. Is that, what you mean, or is it something else?
  • markborgesmarkborges Member Posts: 170
    I usually work with DevOps repositories, so, my source code is usually under Source control.... So, what I did was to actually delete all the folders from my computer, and Clone the DevOps repository again on my computer.... Do you use source control, like DevOps or GitHub?
    Marcelo Borges
    D365 Business Central Solutions Architect
    BC AL/NAV C/AL Developer
    BC Repositories.com
  • vaprogvaprog Member Posts: 1,136
    I don't use source code management for the extensions involved here. But the problem is certainly not in any source code corruption. There might by something missing in a source file, or in a configuration file. But if it does, it is because I never knew about it, not because something was changed or deleted.
Sign In or Register to comment.