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

SubPageLink Enums #14372

Closed
MatthewMcCarthy7 opened this issue Sep 17, 2021 · 4 comments
Closed

SubPageLink Enums #14372

MatthewMcCarthy7 opened this issue Sep 17, 2021 · 4 comments
Labels
extensibility-bug Something in the public APIs isn't working the way it should be ships-in-future-update Fix ships in a future update

Comments

@MatthewMcCarthy7
Copy link

1. Describe the bug
Using the SubPageLink on a Factbox with a field that has a filter from an enum to an option you get warning AL0603, and eventually become an error. So for example mine is using Sales Header Document Type and going to Reservation Entry Source Subtype.

image

2. To Reproduce
Use a Subpage Link that has a filter that goes from Enum to Option.

3. Expected behavior
Is this something we have to use Pragma for or is this something that will become an error? since this is a base application table, I cannot change the option to an enum.

4. Actual behavior
You get a warning

5. Versions:

  • AL Language: 8.1.516714
  • Visual Studio Code:1.60.1
  • Business Central: BC18
  • List of Visual Studio Code extensions that you have installed:
@kalberes
Copy link

Pragma is a workaround. When compiling the baseapp we also have the same warning. Probably there will be a large scale notification when these will really become errors.
Transferring to app. They may know more.

@kalberes kalberes transferred this issue from microsoft/AL Sep 17, 2021
@AlexanderYakunin AlexanderYakunin added the extensibility-bug Something in the public APIs isn't working the way it should be label Sep 28, 2021
@JesperSchulz
Copy link
Contributor

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

@JesperSchulz JesperSchulz added the ships-in-future-update Fix ships in a future update label Oct 7, 2021
@dzzzb
Copy link

dzzzb commented Oct 7, 2021

Out of interest, what was the fix? Are warnings relaxed for Enum vs Option links, or was just the one page in the OP changed to Enum? I guess not the latter, since that table has to link to various different sets of possible document types.

@JesperSchulz
Copy link
Contributor

Looks like a lot of #pragma warning disable / #pragma warning restore were added around "Source Subtype" = FIELD(...). I guess that means this won't turn into an error anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility-bug Something in the public APIs isn't working the way it should be ships-in-future-update Fix ships in a future update
Projects
None yet
Development

No branches or pull requests

5 participants