microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
744 stars 245 forks source link

Table 5406 "Prod. Order Line" - procedure GetStartingEndingDateAndTime #6034

Closed StijnBt closed 4 years ago

StijnBt commented 4 years ago

Used docker container: mcr.microsoft.com/businesscentral/onprem:16.2.13509.13779

[Scope('OnPrem')]
procedure GetStartingEndingDateAndTime(var StartingTime: Time; var StartingDate: Date; var EndingTime: Time; var EndingDate: Date)
  begin
    StartingTime := DT2Time("Starting Date-Time");
    StartingDate := DT2Date("Starting Date-Time");
    EndingTime := DT2Time("Ending Date-Time");
    EndingDate := DT2Date("Ending Date-Time");
  end;

image

Strangely it does not seem protected an I am working in an OnPrem environment. So the error seems off.

qutreson commented 4 years ago

@StijnBt what is the compilation target specified in your app.json? If your extension has the target Cloud set in its manifest, then the compiler is behaving as expected

See: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-json-files#Appjson

StijnBt commented 4 years ago

Correct, it was actually missing completely from the app.json and then it defaults to "Cloud" apparently. So adding it was indeed the solution. Thanks!

"target": "OnPrem",