Restructure for Docsy theme

This commit is contained in:
Jeremy Vyska 2022-02-20 13:18:49 +01:00
parent f4a1ebc077
commit cceb0c945e
376 changed files with 963 additions and 186 deletions

View file

@ -0,0 +1,9 @@
+++
title = "UX"
weight = 1390
+++
## C/AL Coding Guidelines
## **User eXperience**
Find the C/AL guidelines by expanding the menu in the left.

View file

@ -0,0 +1,22 @@
+++
title = "Actions - Images"
weight = 200
+++
All actions must have an image assigned to them.
Bad code
```al
{ 7 ;1 ;Action ;
CaptionML=ENU=Customer - &Balance;
RunObject=Report 121 }
```
Good code
```al
{ 7 ;1 ;Action ;
CaptionML=ENU=Customer - &Balance;
RunObject=Report 121 }
Image=Report }
```

View file

@ -0,0 +1,21 @@
+++
title = "CONFIRM"
weight = 380
+++
Always end CONFIRM with a question mark.
Bad code
```al
ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked';
...
IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN
```
Good code
```al
ChangeAllOpenedEntriesQst@1000 : TextConst 'ENU=Do you want to change all open entries for every customer and vendor that are not blocked?';
...
IF CONFIRM(ChangeAllOpenedEntriesQst,TRUE) THEN
```

View file

@ -0,0 +1,21 @@
+++
title = "FIELDERROR"
weight = 590
+++
Never use FIELDERROR with a period as it is automatically inserted.
Bad code
```al
InvalidValue@1025 : TextConst 'ENU=is invalid.';
...
Cust.FIELDERROR("No.",InvalidValue);
```
Good code
```al
InvalidValue@1025 : TextConst 'ENU=is invalid';
...
Cust.FIELDERROR("No.",InvalidValue);
```

View file

@ -0,0 +1,21 @@
+++
title = "MESSAGE and ERROR"
weight = 790
+++
Always end MESSAGE or ERROR with a period.
Bad code
```al
CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3';
...
ERROR(CustIsBlockedErr,...);
```
Good code
```al
CustIsBlockedErr@1025 : TextConst 'ENU=You cannot %1 this type of document when Customer %2 is blocked with type %3.';
...
ERROR(CustIsBlockedErr,...);
```