Maintainability Index

Maintainability Index: Do not write functions that have a very low maintainability index. This makes the code hard to maintain.

Bad code

Any procedure / trigger that has a maintainability index < 20  

Good code

Any procedure / trigger that has a maintainability index \>= 20\.
The Maintainability Index is computed as a function:
- Lines Of Code (inverse proportional)
- the Halstead Volume
- Cyclomatic Complexity (inverse proportional).

More info

Bad code

Any procedure / trigger that is \> 100 lines of code  

Good code

Any procedure / trigger that is <= 100 lines of code.
A full C/AL Statement counts as 1 line of code