AL Table Proxy Generator - Error when finding several entity definitions in BC-Apps
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
1. Describe the bug
When try to execute AL Table Proxy Generator, an error occurs when there are several entity definitions available.
Error:"System.ArgumentException: An element with the same key but a different value already exists. Key: 'bookableresource'"
In BC 27.x there is two definitions of table bookableresource:
table 6410 "FS Bookable Resource" (located in Base App with property ObsoleteState = Pending;)
table 6610 "FS Bookable Resource"
2. To Reproduce
To reproduce the behaviour a project is necessary that includes an extension which refers to objects of the new Field Service Integration App of Business Central "Field Service Integration".
For the error it only seems to be relevant, that an extension object exists, which refers to the new field service app. The dependency in the app file or even the existance of the symbols file in the repository doesn't play any role.
Current Version is 27.1
3. Expected behavior
First of all, several definitions shouldn't exist. If so, the AL Table Proxy Generator should simply create an object for every definition. Alternatively an exlude parameter would work as well, so that problematic entities don't prevent object creation for other entities.
4. Actual behavior
AL Table Proxy Generator throws an error and doesn't create any object.
5. Versions:
- AL Language: 16
- Visual Studio Code: 1.108.0
- Business Central: 27.1
- List of Visual Studio Code extensions that you have installed:
- AL Language Extension: 16.2.1869542 (also older releases and pre-release affected)
- Operating System:
- Windows
- Linux
- MacOS
Internal work item: AB#619448
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the AL Table Proxy Generator using a project that references the Field Service Integration app and reproduces the duplicate bookableresource definitions in Business Central 27.1. Investigate how multiple entity definitions are collected, then verify that proxy generation no longer fails for the duplicate and produces objects for the supported definitions or honors an exclusion option.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100