openrouter/qwen/qwen3-max-thinking
Known Shortcomings (27)
Sorted by occurrence count (most frequent first)
| # | Concept | AL Concept | Count | Affected Tasks |
|---|---|---|---|---|
| 1 | option-field-optionmembers-required | table-extension-field-properties | 2 | CG-AL-E006, CG-AL-M006 |
|
Description: The model generated a table extension with an Option field but left the OptionMembers property blank or omitted it entirely. In AL, when defining a field of type Option, the OptionMembers property must be explicitly set with at least one value (e.g., OptionMembers = Email,Phone,Mail,SMS). The compiler error AL0153 indicates 'The property OptionMembers cannot be blank'. The model failed to properly define the OptionMembers for the Preferred Contact Method field in the table extension.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0153, AL0104 |
||||
| 2 | variant-type-argument-and-interface-definition | interface-definition | 2 | CG-AL-H023, CG-AL-H015 |
|
Description: The model made multiple errors: (1) It tried to use 'Variant' as a type argument in a generic collection (e.g., Dictionary of [Text, Variant] or similar), but AL does not allow Variant as a type argument in generic types like Dictionary or List. (2) It failed to create the 'IFieldTransformer' interface as a separate AL interface object, instead likely trying to reference it as a Codeunit. In AL, interfaces are defined with 'interface "IFieldTransformer"' syntax and are distinct from codeunits. The TransformRecord procedure should accept a parameter implementing the interface, not a Codeunit type directly referencing the interface name as a codeunit.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0408, AL0104 |
||||
| 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 (AL0107 'identifier expected', AL0104 '=' expected at line 26:32, and AL0104 '}' expected at line 29:13) indicate the model produced syntactically invalid AL code for the query object definition. The generated code likely had issues with the query column/filter syntax, possibly around the ColumnFilter = const(Order) declaration or the Method = Sum/Count aggregate column definitions. The model does not appear to have sufficient knowledge of AL query object syntax including dataitem definitions, column definitions with aggregation methods, and filter elements.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0107, AL0104 |
||||
| 4 | enum-frominteger-syntax | enum-handling | 1 | CG-AL-H007 |
|
Description: The model failed to generate valid code entirely (generated code not found / compilation failed). The AL0151 error 'Expression must be an Option' at line 18:22 indicates the model likely used Enum.FromInteger() or similar enum conversion incorrectly, or passed an enum value where an Option was expected. The model did not understand how to properly work with ErrorInfo.CustomDimensions and enum integer conversion in modern AL. The task requires using Format() to convert enum ordinal to text for CustomDimensions, and Enum::"CG Validation Error".FromInteger() to convert back, along with ErrorInfo.Create() pattern. The model either failed to produce code at all or produced code with fundamental enum/ErrorInfo handling errors.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0151 |
||||
| 5 | list-iteration-pattern | list-of-type-operations | 1 | CG-AL-M002 |
|
Description: The model attempted to use a 'Sum' method on 'List of [Decimal]' which does not exist in AL. In AL, the List type does not have a Sum() method. To sum elements of a List of [Decimal], you must iterate through the list using a foreach loop or index-based for loop and accumulate the total manually. The model failed to generate valid code for the CalculateOrderTotal procedure, using a non-existent .Sum method instead of iterating over the list.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 6 | json-object-api-methods | json-handling | 1 | CG-AL-M005 |
|
Description: The model generated code using incorrect AL JSON API methods. Multiple errors show fundamental misunderstanding of the AL JSON types: (1) JsonObject doesn't have a 'Clear' method - should use Clear(variable) built-in or reinitialize, (2) 'JSON Management' codeunit doesn't have 'TryGetObject' method, (3) JsonToken doesn't have 'IsText' or 'AsText' methods - should use Token.IsValue() and Token.AsValue().AsText(), (4) JsonObject doesn't have a 'Count' method - should use Keys.Count or similar pattern. The model confused AL's native JSON types (JsonObject, JsonToken, JsonValue) API with other frameworks or older BC JSON patterns.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 7 | bc-event-names-and-table-references | event-subscribers-and-bc-object-model | 1 | CG-AL-M008 |
|
Description: The model generated code with multiple fundamental errors about the BC object model: (1) It referenced non-existent events 'OnAfterInsert' and 'OnAfterModify' on the Purchase Header table - the correct integration events have different names (e.g., 'OnAfterInsertEvent' or the model should use different event patterns). (2) It referenced non-existent tables 'Workflow Setup' and 'Workflow Comment Line' - these are not standard BC tables. (3) It referenced a non-existent codeunit 'SMTP Mail' which was deprecated/removed in modern BC versions. The model lacks knowledge of the actual BC event naming conventions, the correct BC workflow-related table names, and the current email API in Business Central.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0280 |
||||
| 8 | report-dataitem-trigger-syntax | report-definition | 1 | CG-AL-M007 |
|
Description: The model generated a report with multiple syntax errors including incorrect brace placement in dataitem definitions, and used 'OnPostDataItem' which is not a valid trigger in AL reports. The valid triggers for report dataitems are OnPreDataItem, OnAfterGetRecord, and OnPostDataItem is not recognized. The compilation errors (AL0104 for missing '}' and AL0162 for invalid trigger) indicate the model does not properly understand AL report structure with nested dataitems, proper trigger names, and correct brace/block scoping. The model also likely had structural issues with how dataitem blocks are nested and closed, leading to cascading syntax errors.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 9 | jsonobject-get-selecttoken-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, but JsonObject.Get() returns a JsonToken via a 'var JsonToken' parameter. The model also tried to use non-existent methods like JsonToken.IsInteger() and JsonToken.AsInteger(). The correct pattern is to first get a JsonToken, then convert it to a JsonValue, and use AsText(), AsDecimal(), AsBoolean(), AsInteger() on the JsonValue. For arrays, you get the JsonToken and then use AsArray().
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 10 | flowfield-calcformula-syntax | flowfield | 1 | CG-AL-M010 |
|
Description: The model generated a FlowField (likely for 'Actual Cost') with an incorrect CalcFormula syntax. The AL compiler error AL0176 at line 125 indicates that the model used an invalid calculation formula method. In AL, CalcFormula must use one of the recognized methods: Average, Count, Exist, Min, Max, Lookup, or Sum. The model likely wrote something syntactically invalid such as a malformed Sum expression or used an unsupported method/syntax in the CalcFormula property. Additionally, the task asked for 'Actual Cost' to be 'calculated from tasks', which should use a FlowField with CalcFormula = Sum("Project Task"."some field" WHERE("Project Code" = FIELD("Project Code"))), but the model got the syntax wrong.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0176 |
||||
| 11 | yaml-parsing-variable-naming-and-syntax | al-syntax-reserved-words-and-json-iteration | 1 | CG-AL-M021 |
|
Description: The model generated AL code with multiple syntax errors. The primary issue at line 84 is using 'Key' as a variable name or in an invalid context - 'Key' may be treated as a reserved word or the model used incorrect syntax for iterating over JsonObject keys. Additional errors suggest malformed expressions and mismatched parentheses/blocks. The model failed to properly implement YAML parsing (which requires manual string splitting in AL since there's no native YAML library) and JSON object iteration patterns. The model likely tried to use foreach-style iteration over JsonObject keys using incorrect syntax, and may have used reserved words as variable identifiers without proper quoting.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 12 | temporary-table-parameter-handling | temporary-table | 1 | CG-AL-H003 |
|
Description: The test TestHighInventoryDiscount fails because the model's generated code does not correctly populate the TempResult temporary record with items that have inventory >= 100. The test finds an Item with Inventory >= 100 and Unit Price > 0, then calls ProcessItemsWithDiscount with MinDiscount=15, and expects to find that item in TempResult with Discount Percent = 15. The failure 'Assert.IsTrue failed. High inventory item should be in results' indicates the item was not inserted into TempResult. This is likely because the model's implementation has a bug in how it loops through items, assigns line numbers, calculates discounts, or inserts records into the temporary table. Since the generated code was not captured ('Generated code not found'), but the app compiled and other tests passed (only TestHighInventoryDiscount failed), the model likely had an issue with the discount tier logic (e.g., using wrong comparison operators like '>' instead of '>=' for the inventory thresholds), causing items with exactly 100 inventory to get 10% instead of 15%, thus being excluded when MinDiscount=15.
Correct Pattern:
Incorrect Pattern:
|
||||
| 13 | word-counting-with-extra-spaces | string-manipulation | 1 | CG-AL-E005 |
|
Description: The model's CountWords implementation does not correctly handle extra/leading/trailing spaces. The test 'TestCountWordsExtraSpaces' passes ' hello world ' and expects 2 words, but the model's implementation returned 8, indicating it likely counted individual characters or spaces rather than properly splitting by whitespace and ignoring empty segments. A correct implementation needs to iterate through the string, tracking transitions from space to non-space characters (or splitting and filtering empty entries).
Correct Pattern:
Incorrect Pattern:
|
||||
| 14 | xmlport-format-textencoding | xmlport-properties | 1 | CG-AL-E009 |
|
Description: The model generated an XMLport with a 'TextEncoding' property while the 'Format' property was either not set or set to 'Xml'. The AL compiler error AL0167 states that 'TextEncoding' can only be used when 'Format' is set to 'VariableText' or 'FixedText'. For an XML export XMLport, the Format defaults to 'Xml' and TextEncoding should not be specified. The model lacks understanding of which XMLport properties are compatible with each other.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0167 |
||||
| 15 | multiline-string-literals | string-literals | 1 | CG-AL-E050 |
|
Description: The model attempted to use multiline string literals in AL but produced improperly terminated text literals (AL0360). AL does not support traditional multiline string literals like other languages. The model likely tried to embed actual newlines inside a single-quoted string literal, which is not valid AL syntax. In AL, multiline text must be constructed either using string concatenation with CR/LF characters (e.g., using TypeHelper or explicit char values), or by using the newer AL multiline string literal syntax (triple single quotes '''...''') available in newer BC versions. The model failed to use the correct syntax for producing multiline text content.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0360 |
||||
| 16 | errorinfo-customdimensions-api | errorinfo-handling | 1 | CG-AL-H007 |
|
Description: The model generated incorrect code for setting CustomDimensions on an ErrorInfo object. The compilation errors at line 16 suggest the model likely used an incorrect method signature for adding custom dimensions, such as calling CustomDimensions.Add() with wrong parameter types or using an incorrect pattern to build the ErrorInfo. The errors 'cannot convert from Text to Boolean' and 'cannot convert from Text to var Table' indicate the model confused the ErrorInfo API - possibly passing text arguments where the API expects different types, or misusing a method like ErrorInfo.AddNavigationAction or similar. The correct pattern involves using a Dictionary of [Text, Text] and assigning it to ErrorInfo.CustomDimensions.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 17 | jsonobject-typed-getter-methods | json-api-patterns | 1 | CG-AL-H014 |
|
Description: The model incorrectly used JsonObject typed getter methods like GetText, GetInteger, GetBoolean, and GetArray. In AL, these methods follow the TryGet pattern where the second parameter is a 'var' output parameter and the method returns a Boolean indicating success. For example, JsonObject.Get('name', JToken) returns Boolean, and JsonValue.AsText() extracts the value. The model instead tried to pass the destination variable directly as the second argument expecting it to work like a simple getter, causing type conversion errors (e.g., 'cannot convert from Text to Boolean'). The task description mentions 'typed JSON getter methods' like GetText('name'), GetInteger('age'), etc., which don't exist as described in AL's JsonObject API. However, the model should have known the correct AL JSON API patterns and used the proper Get/SelectToken approach with JsonToken/JsonValue conversions.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 18 | dictionary-iteration-syntax | collections-dictionary-keys | 1 | CG-AL-H020 |
|
Description: The model used 'Key' as a variable name or keyword incorrectly when iterating over Dictionary keys. In AL, 'Key' is a reserved word in certain contexts. The model likely wrote something like 'foreach Key in Dict.Keys do' or declared a variable named 'Key' in a way that conflicts with AL syntax rules. The correct approach is to use Dict.Keys() method and iterate with a properly named variable (e.g., 'DictKey' or 'K'), avoiding the reserved word 'Key'. The errors appear at lines 55 and 99, which correspond to the MergeDictionaries and GetKeys procedures where dictionary key iteration is needed.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 19 | tryfunction-boolean-return-pattern | recordref-error-handling | 1 | CG-AL-H022 |
|
Description: The model generated code that uses 'not' operator on the return value of RecordRef.Open() or similar methods that return 'None' (void). In AL, RecordRef.Open() is a void procedure - it doesn't return a Boolean. To handle errors from such calls, the model should use [TryFunction] attribute on a helper procedure, or wrap the call in a procedure marked with [TryFunction] and check the Boolean return. The compilation errors at lines 9, 19, and 88 all show 'Operator not cannot be applied to an operand of type None', indicating the model tried patterns like 'if not RecRef.Open(TableId) then' instead of using TryFunction-based error handling (e.g., defining a local [TryFunction] procedure that calls RecRef.Open and then checking its Boolean return).
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0173 |
||||
| 20 | option-field-optionmembers-required | table-extension-field-definition | 1 | CG-AL-M006 |
|
Description: The model generated a table extension with an Option field ('Risk Level') but left the OptionMembers property blank or omitted it entirely. In AL, Option fields require the OptionMembers property to have at least one value defined. The error AL0153 explicitly states 'The property OptionMembers cannot be blank'. The model needed to define OptionMembers = Low,Medium,High,Critical for the Risk Level field. Additionally, the generated code appears to be incomplete or malformed, as the compilation also reports 'App generation failed'.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0153 |
||||
| 21 | al-string-comparison-functions | built-in-functions | 1 | CG-AL-M009 |
|
Description: The model used 'StrComp' which does not exist in AL/Business Central. AL does not have a StrComp function. For string comparison, the model should use standard AL comparison operators (=, <>, etc.) or built-in text methods like UpperCase/LowerCase for case-insensitive comparison. The model likely confused AL with another language (e.g., VBA or C) that has a StrComp function.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0118 |
||||
| 22 | json-token-iteration-syntax | json-object-key-enumeration | 1 | CG-AL-M021 |
|
Description: The model attempted to use 'Key' as a variable or keyword in a context where it is not valid AL syntax. In AL, when iterating over JsonObject keys, you must use the JsonObject.Keys property which returns a List of Text, and then iterate using foreach. The model likely wrote something like 'Key := ...' or used 'Key' as a reserved word incorrectly at lines 64, 85, and 121. The correct pattern is to declare a Text variable (e.g., KeyName) and use 'foreach KeyName in JsonObj.Keys do' or use JsonObj.Keys.Get(Index, KeyName) to enumerate keys. The model doesn't understand the proper AL syntax for iterating over JsonObject members.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 23 | json-value-to-decimal-conversion | json-parsing | 1 | CG-AL-M022 |
|
Description: The model generated code that attempts to pass a JsonValue directly where a Text or Decimal is expected, likely doing something like `JsonToken.AsValue()` passed directly to a function or assignment without calling `.AsDecimal()` or `.AsText()` on the JsonValue. The AL0133 error 'cannot convert from JsonValue to Text' at line 27:38 indicates the model did not properly extract the typed value from a JsonValue object. In AL, when parsing JSON, you must call specific conversion methods like AsDecimal(), AsText(), AsInteger() etc. on JsonValue to get the underlying typed value.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 24 | code-type-string-methods | al-data-types | 1 | CG-AL-H001 |
|
Description: The model attempted to use '.ToUpper' on a Code[2] variable, which is not valid in AL. Code data types in AL are already case-insensitive and automatically stored in uppercase, so there is no ToUpper method available. The model should have compared the CountryCode directly (e.g., using a case statement or if/else) without calling ToUpper, since Code values are inherently uppercase in AL.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 25 | strpos-function-signature | built-in-string-functions | 1 | CG-AL-E005 |
|
Description: The model generated code that calls StrPos with 3 arguments, but the AL built-in StrPos function only accepts 2 arguments: StrPos(String: Text, SubString: Text): Integer. The model likely confused it with a different language's string search function that accepts a start position parameter. The generated code was not captured in the output but the compilation error clearly shows the model wrote something like StrPos(InputText, ' ', StartPos) instead of using the correct 2-argument signature. For finding substrings from a specific position, the model should have used CopyStr to get a substring first, then called StrPos on that substring, or used a different approach entirely.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0126 |
||||
| 26 | string-numeric-extraction-and-replacement | string-operations | 1 | CG-AL-E051 |
|
Description: The model generated code that incorrectly identifies and increments the numeric portion of a string. The test error shows that 'DOC-001' incremented by 1 produces 'DOC-200' instead of 'DOC-002'. This indicates the model's implementation is incorrectly parsing the numeric portion from the string - likely treating each digit independently or misidentifying which characters form the numeric suffix. The correct approach is to find the trailing numeric portion of the string, parse it as an integer, increment it, then format it back with the same zero-padding (same number of digits) and concatenate with the prefix. The model failed to correctly implement this pattern of extracting the rightmost contiguous numeric substring, performing arithmetic on it, and reinserting it with preserved width/padding.
Correct Pattern:
Incorrect Pattern:
|
||||
| 27 | parse-failure | unknown | 1 | CG-AL-M002 |
|
Description: Failed to parse LLM analysis response: Looking at this failure, the test `TestCalculateLineTotalZeroQuantity` expects that calling `CalculateLineTotal(0, 100.00)` returns 0 (zero). However, the generated code raises an error "Quantity must
Correct Pattern:
Incorrect Pattern:
|
||||