openrouter/x-ai/grok-code-fast-1
Known Shortcomings (22)
Sorted by occurrence count (most frequent first)
| # | Concept | AL Concept | Count | Affected Tasks |
|---|---|---|---|---|
| 1 | 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 (AL0107 'identifier expected' at line 27:32, AL0104 '=' expected, etc.) indicate the model produced syntactically invalid AL for the query definition. The generated code was either empty or had fundamental syntax errors in the query structure, likely around the filter element or column definitions. The model doesn't properly know how to construct an AL query object with dataitem, columns with Method = Sum/Count, filter elements with ColumnFilter, and OrderBy clauses.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0107, AL0104 |
||||
| 2 | jsonobject-selecttoken-vs-get | json-api-usage | 2 | CG-AL-M020, CG-AL-H014 |
|
Description: The model incorrectly used JsonObject.Get() by passing typed variables (Text, Decimal, Boolean, Integer, JsonArray) directly as the second argument, but JsonObject.Get() expects a 'var JsonToken' as the second parameter. The correct pattern is to first get a JsonToken, then extract the value from the JsonToken via AsValue().AsText(), AsValue().AsDecimal(), AsArray(), etc. The model also tried to use 'foreach' on a JsonArray directly, which is not supported — you must iterate using an index-based loop with JsonArray.Get(Index, JsonToken). These are fundamental AL JSON API patterns the model failed to apply correctly.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 3 | httpclient-getheaders-usage | http-client-api | 2 | CG-AL-M005, CG-AL-M022 |
|
Description: The model generated code that calls GetHeaders() without the required HttpHeaders parameter. In AL, HttpRequestMessage.GetHeaders(var HttpHeaders) and HttpContent.GetHeaders(var HttpHeaders) require an HttpHeaders variable to be passed as a VAR parameter. The model likely wrote something like `Request.GetHeaders().Add(...)` instead of declaring an HttpHeaders variable and passing it: `Request.GetHeaders(Headers); Headers.Add(...)`. This is a common pattern misunderstanding with the AL HttpClient API where GetHeaders is not a function that returns headers directly but rather populates a VAR parameter.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0135, AL0122 |
||||
| 4 | multiline-string-literals | string-literals | 1 | CG-AL-E050 |
|
Description: The model failed to correctly use AL multiline string literals. The compilation errors (AL0361 'Identifier was not properly terminated', syntax errors about semicolons and expected tokens on consecutive lines) strongly indicate the model attempted to use a multiline string syntax that is not valid in AL. In AL, multiline text literals were introduced in later runtime versions and use a specific syntax (text enclosed in single quotes with actual line breaks, or using TextBuilder/string concatenation). The model likely tried to use double-quoted multiline strings or some other language's multiline syntax (e.g., Python triple quotes or C# verbatim strings), which caused the parser to fail at line 8-11 of the generated file. The task specifically requires multiline string literals, which in AL (runtime 11.0+) use single-quote delimited strings that span multiple lines.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0361 |
||||
| 5 | page-extension-cardpageid-override | page-extension-properties | 1 | CG-AL-E053 |
|
Description: The model failed to generate valid AL code for a page extension. The compilation errors at line 3 and line 15 suggest the model produced syntactically invalid code, likely struggling with the BC 2025 Wave 1 feature of overriding CardPageId on a list page extension. The errors indicate fundamental syntax problems - missing semicolons, unexpected tokens, and unrecognized object keywords - meaning the model either produced malformed page extension syntax or attempted to use an incorrect syntax for the CardPageId property override. The correct pattern requires a standard pageextension declaration with the CardPageId property set at the extension level, plus an action in the actions section.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 6 | json-api-methods | json-object-manipulation | 1 | CG-AL-H014 |
|
Description: The model generated code with multiple errors related to AL's JsonObject and JsonToken API usage: (1) AL0133 - Tried to pass a Text to a Boolean parameter, likely misusing a method overload. (2) AL0135 - Called JsonObject.Get(Text) without the required second 'var JsonToken' parameter - the correct signature is Get(Text, var JsonToken). (3) AL0132 - Tried to call 'AsDecimal' on JsonToken, but JsonToken doesn't have AsDecimal directly; you need to convert to JsonValue first via AsValue().AsDecimal(). The task description mentions 'typed JSON getter methods' like GetText(), GetInteger(), GetBoolean(), GetArray() which don't exist as direct methods on JsonObject in AL. The model needed to use the pattern: JsonObject.Get('key', JsonToken) then JsonToken.AsValue().AsText()/AsInteger()/AsDecimal() etc. The task description itself is somewhat misleading by referencing methods like GetText('name') that don't exist in AL's JSON API, but the model should have known the correct AL JSON patterns regardless.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 7 | recordref-fieldref-dynamic-manipulation | RecordRef-FieldRef-usage | 1 | CG-AL-H022 |
|
Description: The model generated code with syntax errors (semicolon expected at multiple lines around 101, 104, 128, 131). The generated code was not captured in the output, but the compilation errors indicate the model produced invalid AL syntax in the codeunit implementation. The errors at lines 101, 104, 128, 131 suggest issues in procedure bodies - likely incorrect statement termination, possibly using incorrect syntax for try/catch patterns (e.g., using 'try' or 'catch' keywords incorrectly), or malformed if-then-else blocks. The task and tests are valid; the model simply failed to produce syntactically correct AL code for the dynamic record handler codeunit.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0111 |
||||
| 8 | interface-and-implementation-syntax | interface-definition | 1 | CG-AL-M009 |
|
Description: The model generated AL code with syntax errors at line 100, likely involving incorrect return type syntax or procedure signatures in the interface/implementation. The compilation errors (expecting ')', 'end', and semicolons at the same line) suggest the model wrote malformed procedure signatures, possibly using incorrect syntax for return types (e.g., Text[50] as a return type in a procedure declaration) or other structural issues in the codeunit implementing the interface. The task and tests are valid - the test file uses a separate mock codeunit and simply validates the interface contract. The model failed to produce syntactically correct AL code for the interface definition and/or its implementation.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 9 | jsonobject-get-returns-jsontoken | json-handling | 1 | CG-AL-M021 |
|
Description: The model generated code that passes Text variables directly as the second argument to JsonObject.Get(), but JsonObject.Get() requires a 'var JsonToken' parameter. The model should have used a JsonToken variable, then extracted the text value from the token using AsValue().AsText(). Additionally, the model tried to call JsonObject.Set() which doesn't exist - the correct method is Replace() for existing keys or Add() for new keys.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133, AL0519 |
||||
| 10 | string-numeric-extraction-and-padding | text-manipulation-number-formatting | 1 | CG-AL-E051 |
|
Description: The model generated code that fails to properly extract the numeric portion from a string, increment it, and re-insert it with the original zero-padding preserved. The error 'Expected:<DOC-002> Actual:<DOC- 2>' shows the model is replacing the numeric portion with a space-padded number instead of zero-padded. The model likely used Format() or a similar function that produces space-padded output instead of properly using PadStr or StrSubstNo with zero-padding, or manually constructing the zero-padded string. The model needs to: 1) Find the trailing numeric portion of the string, 2) Record its length for zero-padding, 3) Parse it as an integer, 4) Increment/decrement, 5) Format the result back with leading zeros to match the original width, 6) Concatenate with the prefix.
Correct Pattern:
Incorrect Pattern:
|
||||
| 11 | foreach-loop-continue-pattern | loop-constructs-and-list-iteration | 1 | CG-AL-H013 |
|
Description: The model generated incorrect code for the SumPositiveNumbers procedure. Based on the test output, the sum returned 30 instead of 60 for inputs [10, 20, 30], suggesting the model's implementation only summed the last element or had a logic error such as reassigning instead of accumulating (e.g., using ':=' instead of '+='). The generated code was not captured but all tests failed, indicating fundamental implementation errors across all three procedures. The model failed to correctly implement foreach loops with continue statements, proper accumulation patterns, and comma-separated string building with arrays.
Correct Pattern:
Incorrect Pattern:
|
||||
| 12 | complex-report-with-mock-codeunit | report-definition-and-helper-codeunit | 1 | CG-AL-M007 |
|
Description: The model failed to generate valid AL code for a complex task requiring both a Report object (Sales Performance Analysis, ID 70001) and a helper codeunit (CG-AL-M007 Mock Calculator) used by the tests. The compilation errors at line 274 indicate a syntax error in the generated code - likely the model produced malformed AL syntax (possibly mixing object definitions incorrectly, using wrong delimiters, or failing to properly structure one of the required objects). The errors AL0104 ('Syntax error, ':' expected', 'Syntax error, ';' expected') and AL0198 ('Expected one of the application object keywords') suggest the model produced code that broke the AL parser, possibly by including invalid syntax within a procedure body or object definition, or by failing to properly close an object before starting another one.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 13 | event-subscriber-table-definition | event-subscriber | 1 | CG-AL-E010 |
|
Description: The model generated a Table object named 'Item' (which conflicts with the existing Item table in the Base Application) instead of just creating a codeunit with an event subscriber. The AL0197 error confirms the model declared a 'Table' named 'Item', and the AL0275 errors are all cascading ambiguous reference errors because there are now two 'Item' tables. Additionally, the event subscriber parameter type didn't match (AL0284) because the subscriber was referencing the wrong/ambiguous Item table. The model should have created only a codeunit (70001) that subscribes to the existing Item table's OnAfterInsertEvent without defining any new table object.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0197 |
||||
| 14 | multiline-string-literals | string-operations | 1 | CG-AL-E050 |
|
Description: The model failed to generate valid AL code for multiline string literals. The compilation errors (AL0361 - unterminated identifier, plus numerous syntax errors on subsequent lines) indicate the model likely attempted to use a multiline string syntax that doesn't exist in AL, or used incorrect quoting/escaping. In AL, multiline text literals can be expressed using the text constant with line breaks inserted via character codes (e.g., using a TextBuilder or concatenation with CR/LF characters), or in newer AL versions using the verbatim string literal syntax. The model appears to have produced code with raw multiline strings or incorrect string delimiters that the AL compiler cannot parse.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0361 |
||||
| 15 | dictionary-iteration-syntax | dictionary-type-usage | 1 | CG-AL-H018 |
|
Description: The model generated code that iterates over a Dictionary of [Text, Text] using invalid syntax. At line 80, it used 'Key' in a context that is not valid AL syntax. In AL, to iterate over a Dictionary you must use the Dictionary.Keys() method to get a List of keys, then use a foreach loop over that list. The model likely wrote something like 'foreach Key in RequestHeaders' or used 'Key' as a variable name in an invalid expression context, resulting in AL0519 ('Key' is not valid value in this context).
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 16 | inherent-entitlements-permissions-values | codeunit-properties | 1 | CG-AL-H019 |
|
Description: The model used 'Include' as the value for InherentEntitlements and InherentPermissions properties, but 'Include' is not a valid permission value in AL. The valid values for these properties are X (Execute), R (Read), I (Insert), M (Modify), D (Delete), or combinations thereof. The task specifies 'InherentEntitlements = X' and 'InherentPermissions = X', meaning Execute permissions. The model likely confused the syntax or used an incorrect identifier.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0776 |
||||
| 17 | dictionary-iteration-syntax | collections-dictionary-foreach | 1 | CG-AL-H020 |
|
Description: The model used 'Key' as a variable name or keyword incorrectly when iterating over Dictionary entries. In AL, to iterate over dictionary keys you must use the Dictionary.Keys() method to get a List of keys, then iterate over that list with a foreach loop. The model likely wrote something like 'foreach Key in Dict' or used 'Key' as an undeclared identifier at lines 48 and 83, causing AL0519 ('Key' is not valid value in this context) and subsequent syntax errors. The correct pattern is to declare a variable for the key, call Dict.Keys() to get a List, and iterate with 'foreach KeyVar in KeyList do'.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 18 | codeunit-basic-structure | codeunit-definition | 1 | CG-AL-H022 |
|
Description: The model failed to generate valid AL code for the codeunit. The generated code file was either empty or contained fundamentally broken AL syntax (semicolon expected errors at lines 11 and 14, and missing closing brace). The compilation errors (AL0111 semicolon expected, AL0104 '}' expected, AL0198 expected application object keyword) indicate the model produced malformed AL code that doesn't follow basic codeunit structure. The task and tests are valid - the model simply failed to produce syntactically correct AL code for a codeunit with RecordRef/FieldRef operations.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0111 |
||||
| 19 | bitwise-vs-logical-or-operator | al-operators | 1 | CG-AL-M009 |
|
Description: The model generated code that uses the 'or' operator with Integer operands (likely trying to do bitwise OR or combining boolean conditions incorrectly). In AL, the 'or' operator is a logical operator that only works with Boolean operands. The model likely wrote something like 'if condition1 or condition2' where condition1 and condition2 evaluate to Integer rather than Boolean, or attempted to use 'or' as a bitwise operator on integers. The error occurs at line 133 of the generated file. The model should have used proper Boolean expressions or comparison operators to produce Boolean operands before applying 'or'.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0175 |
||||
| 20 | page-extension-cardpageid-override | page-extension-syntax | 1 | CG-AL-E053 |
|
Description: The model failed to generate valid AL code for the page extension. The compilation errors at line 3 and line 15 suggest the model produced syntactically invalid code, likely struggling with the BC 2025 Wave 1 feature of overriding CardPageId on a page extension. The model either didn't know the correct syntax for this new feature or produced malformed AL code entirely. The 'Generated code not found' note and the numerous syntax errors (expecting ';', '}', integer literals, identifiers) indicate the model produced something that doesn't parse as a valid AL page extension object.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 21 | list-of-type-syntax | generic-type-syntax | 1 | CG-AL-M023 |
|
Description: The model failed to generate valid AL code (generated code was not found/empty or had fundamental syntax errors). The compilation errors all point to syntax issues around '[' and ']' characters, which strongly suggests the model incorrectly used generic type syntax like 'List of [Text]' or 'List of [Code[20]]'. In AL, these types use square brackets as part of the syntax (e.g., 'List of [Text]'), and the model likely either omitted them, used angle brackets, or otherwise malformed the generic type declarations. The errors at multiple lines involving '[' expected and ']' expected confirm the model didn't properly handle AL's generic collection type syntax (List of [Type]) and possibly Code[20] field type syntax within return types and parameters.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 22 | trigger-side-effects-on-insert | table-extension-triggers | 1 | CG-AL-M006 |
|
Description: The model added an OnAfterInsert trigger in the table extension that calls TriggerRiskAssessment() -> UpdateRiskLevel(), which validates Credit Score range (300-850). When LibrarySales.CreateCustomer inserts a new customer, Credit Score defaults to 0, which fails the validation. The model should not have added automatic risk assessment in the insert trigger, or should have guarded against unset (0) credit scores. The task asked for procedures and field validations, not automatic trigger-based assessment on insert.
Correct Pattern:
Incorrect Pattern:
|
||||