formatted nav patterns 2 to 4

This commit is contained in:
christianbraeunlich 2022-02-05 19:44:44 +01:00
parent 2fad891a77
commit f1f4aab1d7
55 changed files with 788 additions and 506 deletions

View file

@ -11,8 +11,12 @@ Reason:
Bad code
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME("Location Code"),...)
```al
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDNAME("Location Code"),...)
```
Good code
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION("Location Code"),...)
```al
IF NOT CONFIRM(UpdateLocationQst,TRUE,FIELDCAPTION("Location Code"),...)
```

View file

@ -6,15 +6,19 @@ Declare Text Constant as global variables.
Bad code
PROCEDURE GetRequirementText@6(...) : Text\[50\];
VAR
```al
PROCEDURE GetRequirementText@6(...) : Text\[50\];
VAR
RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away';
BEGIN
BEGIN
```
Good code
VAR
```al
VAR
RequirementOptionsTxt@1002 : TextConst 'ENU=Shipment,Receive,Pick,Put-Away';
...
PROCEDURE GetRequirementText@6(...) : Text\[50\];
BEGIN
...
PROCEDURE GetRequirementText@6(...) : Text\[50\];
BEGIN
```

View file

@ -6,32 +6,40 @@ Pass user messages using Text Constants. It makes translation easy.
Bad code
ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment "';
...
IF CONFIRM(ImportAttachmentQst + Caption +'?',TRUE) THEN BEGIN
```al
ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment "';
...
IF CONFIRM(ImportAttachmentQst + Caption +'?',TRUE) THEN BEGIN
```
Good code
ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment %1?"';
...
IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN
```al
ImportAttachmentQst@1021 : TextConst 'ENU="Import attachment %1?"';
...
IF CONFIRM(STRSUBSTNO(ImportAttachmentQst, Caption),TRUE) THEN BEGIN
```
Bad code
...
```al
...
IF NOT
CONFIRM(
STRSUBSTNO(
'Difference on Periodic entries: %1 on %2' +
'Do you want to continue?',Balance,Date),
TRUE)
CONFIRM(
STRSUBSTNO(
'Difference on Periodic entries: %1 on %2' +
'Do you want to continue?',Balance,Date),
TRUE)
THEN
ERROR('Program terminated by the user');
ERROR('Program terminated by the user');
```
Good code
DiffOnPeriodEntiesQst@100 : TextConst 'ENU="Difference on Periodic entries: %1 on %2\\ Do you want to continue?"';
ProgramTerminatedErr@200 : TextConst 'ENU="Program terminated by the user"';
...
```al
DiffOnPeriodEntiesQst@100 : TextConst 'ENU="Difference on Periodic entries: %1 on %2\\ Do you want to continue?"';
ProgramTerminatedErr@200 : TextConst 'ENU="Program terminated by the user"';
...
IF NOT CONFIRM(STRSUBSTNO(DiffOnPeriodEntiesQst,Balance,Date),TRUE) THEN
ERROR(ProgramTerminatedErr);
ERROR(ProgramTerminatedErr);
```