AL icon indicating copy to clipboard operation
AL copied to clipboard

Table 5406 "Prod. Order Line" - procedure GetStartingEndingDateAndTime

Open StijnBt opened this issue 6 years ago • 2 comments

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.

StijnBt avatar Jul 14 '20 20:07 StijnBt

@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

qutreson avatar Jul 16 '20 12:07 qutreson

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",

StijnBt avatar Jul 16 '20 15:07 StijnBt