add colorization to best practice

This commit is contained in:
christianbraeunlich 2022-03-19 21:45:41 +01:00
parent 4fbfc28c9e
commit bd7ea0e118
20 changed files with 58 additions and 59 deletions

View file

@ -11,14 +11,14 @@ _Created by waldo, Described by waldo_
When you perform a "DeleteAll" when there is nothing to delete, it will still perform a lock. When you for example perform a DeleteAll on an empty table, it will result in a table lock.
Therefore it's good practice to always check if the table is empty when performing a DeleteAll.
## Bad code
## <span style="color:red">Bad code</span>
```al
EmptyTableWLD.SetRange(Code, 'AJ');
EmptyTableWLD.DeleteAll(true);
```
## Good code
## <span style="color:lime">Good code</span>
```al
EmptyTableWLD.SetRange(Code, 'AJ');