Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WITH Scope Name Collision #191

Open
Ji-Peter opened this issue Jun 22, 2022 · 2 comments
Open

WITH Scope Name Collision #191

Ji-Peter opened this issue Jun 22, 2022 · 2 comments

Comments

@Ji-Peter
Copy link

Since with either implicit or explicit are being deprecated, shouldn't this recommend not using with at all?

@JeremyVyska
Copy link
Collaborator

Are there pages recommending use of with?

I found this archive one: https://alguidelines.dev/docs/navpatterns/3-cal-coding-guidelines/readability/nested-withs/

@christianbraeunlich
Copy link
Contributor

There are some rules that would throw an error in the future:

Use of implicit 'with' will be removed in the future. Qualify with '{0}':
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/diagnostics/diagnostic-al604

The 'with' statement is deprecated and will be removed for cloud development in a future release:
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/diagnostics/diagnostic-al606

So, yes - would be recommended to not use them any longer and to convert, see: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-deprecating-with-statements-overview

With Business Central 2022 release wave 2, the AL:Go! template for creating new AL projects in Visual Studio Code, now enables explicit with statements by default, by adding the NoImplicitWith option to the features property in the generated app.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants