Closed kine closed 2 years ago
Hi,
Many thanks for raising this issue. Unfortunately we have not been able to get to this issue as soon as we'd have liked. Since it has been a long time since this issue was last updated, it is possible that this has been fixed by a newer release of Business Central and the AL extension for Visual Studio Code. We have thus decided to close it.
If the issue still affects you on the latest insider build of Business Central, please help us and open a new issue for us with the latest steps to reproduce the issue, and link back to this closed issue to track any comments or discussions.
Thanks,
Thaddeus
Describe the bug We have hit a problem, when local codeunit variable (cmdBuilder in the video) loose available methods in the intellisense when used in Repeat..until block with if..then block with beign..end statement. If no begin..end statement is used, all is ok. If repeat..until is not used, all is ok. When it is wrong, there is only Run method listed as available. When it is entered and then removed again, the intellisense shows correctly all references again. Very weird, thus I made the video, see screenshot sections.
Another part (reason or effect, do not know) is, that when the AL is "broken" (not showing the methods), The codeunit variable is marked with error:
even when the codeunit is defined only in the app B. Seems that it is somehow connected to the fact, that the used codeunit variable is using codeunit defined in dependency app.
Another error which appear when the codeunit is in state that it cannot be compiled (the line is not finished) is this:
And I am not sure if this is not the source of the problem (exception leads to failure of creating the intellisense data)
To Reproduce I am unable to reproduce this in clean app, thus there could be some dependency on the specific code. I am able to send the code if needed to MS.
Expected behavior The intellisense is delivering all available methods for the codeunit regardless in which statement the variable is used.
Screenshots
5. Versions: