AL
AL copied to clipboard
Table 5406 "Prod. Order Line" - procedure GetStartingEndingDateAndTime
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;

Strangely it does not seem protected an I am working in an OnPrem environment. So the error seems off.
@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
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",