openrouter/qwen/qwen3-coder-next
Known Shortcomings (19)
Sorted by occurrence count (most frequent first)
| # | Concept | AL Concept | Count | Affected Tasks |
|---|---|---|---|---|
| 1 | codeunit-generation-empty-output | codeunit-definition | 5 | CG-AL-H010, CG-AL-H018, CG-AL-H022, CG-AL-M002, CG-AL-H205 |
|
Description: The model failed to generate any AL code at all. The generated code file is empty or missing, resulting in a compilation error AL0198 expecting an application object keyword. The task and tests are valid - the model simply did not produce the required codeunit 'CG Order Processor' (ID 70214) with IntegrationEvent publishers and the ProcessOrder/ValidateOrder procedures.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0198, AL0124 |
||||
| 2 | interface-definition-syntax | interface-definition | 3 | CG-AL-E032, CG-AL-H015, CG-AL-M009 |
|
Description: The model failed to generate valid AL code for an interface definition. The compilation errors (AL0104 at line 12:25 expecting ';', AL0124 saying the property '"CG Token Provider"' cannot be used in this context) suggest the model likely generated something like a codeunit or used incorrect syntax for declaring an AL interface. AL interfaces use the 'interface' keyword without an object ID, e.g., 'interface "CG Token Provider"' rather than 'interface 50100 "CG Token Provider"'. The model also needed to generate a mock codeunit implementing the interface, which it apparently failed to do correctly.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104, AL0198 |
||||
| 3 | query-object-syntax | query-definition | 2 | CG-AL-H011, CG-AL-H017 |
|
Description: The model failed to generate valid AL code for a query object. The compilation errors (AL0104 'Syntax error, } expected' and AL0198 'Expected one of the application object keywords') at line 5 indicate the model produced syntactically invalid AL code that doesn't conform to the query object structure. The generated code file was either empty, malformed, or used incorrect syntax for defining an AL query object with dataitems, columns, and filter elements. The task and tests are perfectly valid - the model simply lacks knowledge of how to properly construct an AL query object.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104, AL0114 |
||||
| 4 | initvalue-vs-defaultvalue | field-properties | 1 | CG-AL-E001 |
|
Description: The model used the property 'DefaultValue' on a Boolean field to set the default to true, but in AL for Business Central, the correct property name is 'InitValue', not 'DefaultValue'. The compiler error AL0124 indicates that 'DefaultValue' is not a valid property in this context. The model should have used 'InitValue = true;' on the Active field to ensure it defaults to true when Init() is called.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0124 |
||||
| 5 | text-trim-method-unavailable | text-manipulation-methods | 1 | CG-AL-E005 |
|
Description: The model generated code that uses a 'Trim' method on a Text variable, which does not exist in AL. In AL, Text type does not have a built-in Trim() method. The model likely confused AL's Text type methods with C# string methods. To trim whitespace in AL, the model should use DelChr() function instead, e.g., DelChr(InputText, '<>', ' ') to remove leading and trailing spaces. The compilation error AL0118 'The name Trim does not exist in the current context' confirms this. The generated code was not captured but the error at line 45 indicates the model attempted to call Trim() likely in the CountWords procedure when handling extra spaces.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0118 |
||||
| 6 | table-extension-for-custom-fields | table-extension | 1 | CG-AL-E006 |
|
Description: The task asks to create a page extension that adds fields (Preferred Contact Method, Customer Notes, VIP Customer) to the Customer Card. However, these fields don't exist on the base Customer table (Table 18). The model needed to create BOTH a table extension (to add the new fields to the Customer table) AND a page extension (to display them on the Customer Card). The model either failed to generate any code or generated only a page extension without the required table extension, resulting in compilation errors because the Customer record doesn't contain definitions for the new fields. The test file accesses these fields directly on the Customer record (e.g., Customer."Preferred Contact Method"), which requires a table extension to define them.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 7 | multiline-string-literals | text-literal-syntax | 1 | CG-AL-E050 |
|
Description: The model attempted to use multiline string literals by placing actual line breaks inside single-quoted AL text literals (e.g., 'SELECT...\nFROM...'), which is not valid AL syntax. AL text literals must be terminated on the same line. The correct approach in modern AL (runtime 12.0+) is to use the @'' verbatim string literal syntax for multiline strings, or alternatively use string concatenation with explicit newline characters (e.g., using a variable set to char 13 + char 10). The AL0360 error 'Text literal was not properly terminated' confirms the model broke a string across multiple lines without using the proper verbatim string syntax.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0360 |
||||
| 8 | list-of-text-no-clear-method | list-type-methods | 1 | CG-AL-E051 |
|
Description: The model generated code that calls .Clear() on a 'List of [Text]' variable. In AL, the List type does not have a Clear method. To reset a list, you should declare a new list variable or use other approaches. The model incorrectly assumed that List of [Text] supports a .Clear() method, which caused AL0132 compilation errors. The task and tests are perfectly valid - the model simply used an API that doesn't exist on the AL List type.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 9 | codeunit-generation-empty-output | tryfunction-pattern | 1 | CG-AL-H008 |
|
Description: The model failed to generate any AL code at all. The compilation error 'Expected one of the application object keywords' at position 1:1 indicates the generated file was either empty or contained no valid AL object declaration. The task required creating a codeunit implementing the TryFunction pattern with safe execution wrappers, but the model produced no recognizable AL code. The task definition and test file are both valid and correct.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0198 |
||||
| 10 | empty-or-missing-code-generation | basic-code-generation | 1 | CG-AL-H007 |
|
Description: The model failed to generate any valid AL code at all. The compilation error AL0198 'Expected one of the application object keywords' at position 1:1 indicates the generated file was either empty or contained no valid AL object declarations. The model needed to produce both an enum 'CG Validation Error' (ID 70211) and a codeunit 'CG Validation Engine' (ID 70210) using ErrorInfo, CustomDimensions, and modern error handling patterns, but produced nothing usable.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0198 |
||||
| 11 | al-object-structure-syntax | table-and-codeunit-definition | 1 | CG-AL-H003 |
|
Description: The model generated AL code with syntax errors - the compilation errors (AL0104 'Syntax error, } expected' at line 50, AL0114 'integer literal expected' at line 50, and AL0198 'Expected one of the application object keywords' at line 93) indicate the model produced malformed AL code. The task required creating both a table (ID 70203 'CG Discount Result') and a codeunit (ID 70202 'CG Temp Table Processor') with proper structure, but the generated code had fundamental syntax issues, likely around the table field definitions or object boundaries. The 'Generated code not found' note and the compilation errors at specific lines suggest the model either produced incomplete code or used incorrect syntax for defining the table fields and/or the codeunit procedure with temporary table parameters.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 12 | reserved-keyword-as-parameter-name | al-syntax-reserved-words | 1 | CG-AL-H014 |
|
Description: The model used 'Key' as a parameter name in the SafeGetText procedure, but 'key' is a reserved keyword in AL. The task definition specifies the parameter should be named 'Key', which conflicts with AL's reserved word. However, the model should have known to escape it or use an alternative name. The error AL0105 at line 50 indicates the compiler encountered 'key' where an identifier was expected. In AL, reserved keywords can be used as identifiers by enclosing them in double quotes, e.g., "Key". The model failed to apply this AL syntax rule.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0105 |
||||
| 13 | dictionary-iteration-syntax | dictionary-foreach-loop | 1 | CG-AL-H020 |
|
Description: The model attempted to use 'Key' as a foreach variable name or used incorrect syntax for iterating over a Dictionary in AL. In AL, you cannot use 'foreach Key in Dict.Keys do' or similar patterns directly. Instead, you must retrieve the keys into a List first using Dict.Keys() and then iterate over that list, or use the correct foreach syntax: 'foreach KeyVar in Dict.Keys do' where KeyVar is a properly declared variable. The errors at lines 60 and 113 indicate the model wrote something like 'Key in Dict' without properly declaring Key as a variable, or used a syntax pattern not valid in AL for dictionary iteration.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 14 | page-object-structure | page-definition | 1 | CG-AL-M004 |
|
Description: The model failed to generate valid AL code for a page object. The compilation errors (AL0104 'Syntax error, } expected' at line 14, and AL0198 expecting an application object keyword) indicate the generated code has fundamental structural/syntax issues - likely the model produced incomplete or malformed page definition syntax. The 'Generated code not found' note and the nature of the errors (expecting closing brace and object keywords) suggest the model either produced no meaningful output or produced severely malformed AL page code that doesn't follow the basic page object structure pattern (page ID Name { ... }).
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 15 | json-object-get-pattern | json-api-usage | 1 | CG-AL-M020 |
|
Description: The model incorrectly used JsonObject.Get() by passing typed variables (Text, Decimal, Boolean, Integer, JsonArray) directly as the second argument instead of using a JsonToken variable. In AL, JsonObject.Get(key, var JsonToken) returns a JsonToken, which must then be converted via AsValue().AsText(), AsValue().AsDecimal(), etc. The model also used non-existent methods like JsonToken.IsInteger(), JsonToken.AsInteger(), JsonToken.AsText(), and JsonObject.GetNames(). The correct pattern is to get a JsonToken first, then use .AsValue() to get a JsonValue, and then call the appropriate type conversion method on the JsonValue.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 16 | json-token-key-variable-naming | json-object-iteration | 1 | CG-AL-M021 |
|
Description: The model generated code that uses 'Key' as a variable name or token in a context where AL doesn't recognize it. The errors at lines 56, 85, and 113 all show 'Key' is not valid in this context, suggesting the model tried to use a pattern like iterating over JsonObject keys using a syntax that doesn't exist in AL (e.g., 'Key := ...' or 'foreach Key in ...'). In AL, to iterate over JsonObject keys, you must use JsonObject.Keys and proper enumeration patterns, or use JsonToken/JsonValue types correctly. Additionally, the error at line 153 about preprocessor directives suggests the model may have included a '#' character in a string or comment that AL interprets as a preprocessor directive not at the start of a line. The model lacks knowledge of proper AL JSON API iteration patterns and how to work with JsonObject.Keys() which returns a List of Text.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 17 | date-arithmetic-calcdate | date-manipulation | 1 | CG-AL-M088 |
|
Description: The model attempted to use .AddMonths() and .AddYears() methods on the Date type, which do not exist in AL. In AL/Business Central, date arithmetic is performed using the CalcDate function with date formula strings (e.g., CalcDate('<1M>', BaseDate) to add one month). The model appears to have confused AL's date handling with C#/.NET date methods.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 18 | markdown-in-al-output | code-generation-format | 1 | CG-AL-M005 |
|
Description: The model failed to generate valid AL code entirely. The compilation errors (unexpected backtick characters, unterminated text literals, expected application object keywords) indicate the model output markdown-formatted text (with backtick code fences) or explanatory prose instead of raw AL code. The generated code file contains markdown formatting artifacts rather than a proper AL codeunit definition. The task and tests are valid - the model simply failed to produce any valid AL code for the 'External Payment Service' codeunit.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0198 |
||||
| 19 | empty-or-markdown-output | code-generation-basics | 1 | CG-AL-M007 |
|
Description: The model failed to generate valid AL code entirely. The compilation errors (unexpected characters like '|', '`', '—') indicate the model output markdown-formatted text (likely a markdown table or explanation) instead of actual AL code. The task required generating both a Report object (ID 70001) named 'Sales Performance Analysis' and a helper codeunit 'CG-AL-M007 Mock Calculator' with specific calculation methods. The model produced no valid AL code at all - the output appears to be markdown content with pipe characters (table formatting), backticks (code formatting), and em-dashes rather than AL application objects.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0198 |
||||