mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
Contributed by CURABIS ApS, generalized from patterns observed across real AppSource/PTE development. Each article follows the knowledge file format (frontmatter, Description/Best Practice/Anti Pattern, sibling .good.al/.bad.al samples).
22 lines
446 B
AL
22 lines
446 B
AL
table 50101 "Course"
|
|
{
|
|
fields
|
|
{
|
|
field(1; "No."; Code[20]) { }
|
|
// 1 = Beginner, 2..3 = Intermediate, 4+ = Advanced
|
|
field(10; Difficulty; Integer) { }
|
|
}
|
|
}
|
|
|
|
codeunit 50100 "Course Level Helper"
|
|
{
|
|
procedure LevelText(Difficulty: Integer): Text
|
|
begin
|
|
case Difficulty of
|
|
1:
|
|
exit('Beginner');
|
|
2, 3:
|
|
exit('Intermediate');
|
|
end;
|
|
end;
|
|
}
|