anthropic/claude-haiku-4-5-20251001
All Known Shortcomings
Sorted by occurrence count (most frequent first)
| # | Concept | AL Concept | Count | Affected Tasks |
|---|---|---|---|---|
| 1 | event-subscriber-codeunit-subtype | event-subscriber-binding | 1 | CG-AL-E010 |
|
Description: The model incorrectly added 'Subtype = Test;' to the event subscriber codeunit. The task asked for a simple event subscriber codeunit, not a test codeunit. When a codeunit has Subtype = Test, event subscribers within it must use manual binding (EventSubscriberInstance = Manual). The model confused the purpose of the codeunit - it should be a regular codeunit that subscribes to events, not a test codeunit. Additionally, the model included test procedures in what should be a simple event subscriber codeunit.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0501 |
||||
| 2 | evaluate-function-syntax | built-in-functions | 1 | CG-AL-E051 |
|
Description: The model incorrectly used the Evaluate function. In AL, Evaluate() is a function that parses a string into a variable and requires a variable as the first parameter (passed by reference), not a direct assignment. The model wrote 'NumericPart := Evaluate(CopyStr(Value, StartPos))' which is syntactically incorrect. Evaluate returns a Boolean indicating success/failure, and the parsed value is stored in the first parameter passed by reference.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0135 |
||||
| 3 | test-attribute-codeunit-subtype | codeunit-subtype-test | 1 | CG-AL-E052 |
|
Description: The model incorrectly added [Test] procedures with test attributes to a regular codeunit (not a Test subtype codeunit). In AL, the [Test] attribute can only be used within a codeunit that has 'Subtype = Test'. The task asked for a utility codeunit with type conversion procedures, but the model added test procedures with [Test] attributes directly in the main codeunit, which is invalid.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0243 |
||||
| 4 | pageextension-property-syntax | page-extension-properties | 1 | CG-AL-E053 |
|
Description: The model incorrectly wrapped the CardPageId property in a 'properties' block. In AL page extensions, properties like CardPageId should be declared directly at the top level of the pageextension body, not inside a 'properties { }' wrapper. The 'properties' keyword is not valid syntax in this context. The model also attempted to use a feature (overriding CardPageId on page extensions) that may not be available or has different syntax requirements in BC 2025 Wave 1.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0124 |
||||
| 5 | codeunit-enum-structure | al-object-definition | 1 | CG-AL-H007 |
|
Description: The model failed to generate proper AL object definitions. Instead of creating a complete codeunit and enum with proper structure, the model only output a single line 'ErrorInfo := ErrorInfo.Create();' which is not a valid AL file. AL files must start with an application object keyword (table, codeunit, enum, etc.) and contain the full object definition. The task required creating both a codeunit 'CG Validation Engine' (ID 70210) and an enum 'CG Validation Error' (ID 70211) with specific procedures and values.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0198 |
||||
| 6 | query-groupby-syntax | query-definition | 1 | CG-AL-H011 |
|
Description: The model incorrectly used 'GroupBy;' as a standalone property inside column definitions. In AL queries, GroupBy is not a standalone property but should be used as 'Method = Group' or the column should be listed in a separate 'keys' section. Additionally, the model used incorrect syntax for 'orderby' - it should be a separate element outside the dataitem with proper syntax like 'orderby(Sell_to_Customer_No)' without the 'Ascending' parameter inside parentheses.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0124 |
||||
| 7 | jsonobject-method-signatures | json-handling | 1 | CG-AL-H014 |
|
Description: The model incorrectly assumed that JsonObject has direct typed getter methods like GetText(), GetInteger(), GetBoolean(), GetArray(), and GetDecimal() that return values directly. In AL, JsonObject uses Get() method which requires a var JsonToken parameter (out parameter pattern), and JsonArray.Get() also requires a var JsonToken parameter. The model also incorrectly used GetText(Key, DefaultValue) overload which doesn't exist - the actual pattern requires checking if the key exists first or using TryGetValue patterns.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0135 |
||||
| 8 | incomplete-multi-object-generation | interface-implementation-pattern | 1 | CG-AL-H015 |
|
Description: The model only generated the interface definition but failed to generate the three required codeunits: 'PayPal Provider' (ID 70215), 'Credit Card Provider' (ID 70216), and 'Payment Service' (ID 70217). The task required implementing a complete interface pattern with multiple objects, but the model stopped after creating just the interface.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0185 |
||||
| 9 | query-count-column-syntax | query-aggregation-columns | 1 | CG-AL-H017 |
|
Description: The model incorrectly defined a Count column in an AL query. When using Method = Count, the column should not reference a specific field as its data source. The model wrote 'column(MatchCount; "Dimension Set ID")' with Method = Count, but for Count aggregation, the column should either have no data source field or use a valid pattern. The error AL0353 indicates that a Column must have a valid data source OR have Method = Count (not both in this invalid combination). For CrossJoin queries with Count aggregation, the column definition needs to follow proper AL query aggregation syntax.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0353 |
||||
| 10 | codeunit-self-reference | codeunit-fluent-api | 1 | CG-AL-H018 |
|
Description: The model attempted to use 'Rec' to reference the current codeunit instance, but 'Rec' is only valid in table contexts (for record variables), not in codeunits. In AL, codeunits don't have a 'Rec' or 'this' equivalent. For fluent API patterns in codeunits, the model should simply return the codeunit variable directly using 'exit(Self)' where Self is declared as the codeunit type, or more commonly in AL, use a SingleInstance codeunit pattern or return 'this' codeunit by declaring a local variable and assigning it properly.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0118 |
||||
| 11 | foreach-dictionary-keys-syntax | dictionary-iteration | 1 | CG-AL-H020 |
|
Description: The model incorrectly used 'foreach Key in Dict1 do' and 'foreach Key in Dict do' syntax to iterate over dictionary keys. In AL, when iterating over a Dictionary using foreach, you must use the Keys() method to get the list of keys first. The correct syntax is 'foreach Key in Dict.Keys() do' or alternatively iterate using 'Dict.Keys.Get()' in a for loop. The model's syntax 'foreach Key in Dict1 do' is not valid AL syntax for dictionary iteration.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 12 | recordref-open-return-type | recordref-operations | 1 | CG-AL-H022 |
|
Description: The model incorrectly assumed that RecordRef.Open() returns a Boolean value that can be compared with '= false'. In AL, RecordRef.Open() is a procedure that returns nothing (void). It throws a runtime error if the table cannot be opened. To handle invalid table IDs, the code should use a TryFunction or check if the table exists before opening. The model wrote 'if RecRef.Open(TableId) = false then' which causes compilation error AL0175 because Open() returns 'None' (void), not Boolean.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0175 |
||||
| 13 | interface-codeunit-parameter | interface-usage | 1 | CG-AL-H023 |
|
Description: The model incorrectly declared a procedure parameter using 'Codeunit "IFieldTransformer"' syntax. In AL, when a procedure accepts an interface implementation, the parameter type should be the interface name directly (without the 'Codeunit' keyword), not 'Codeunit "InterfaceName"'. The compiler error AL0185 indicates it's looking for a codeunit named 'IFieldTransformer' which doesn't exist - the model defined an interface, not a codeunit.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0185 |
||||
| 14 | dataitem-link-syntax | report-dataitem-definition | 1 | CG-AL-M007 |
|
Description: The model used incorrect syntax for DataItemLink in report dataitems. In AL reports, DataItemLink must use the FIELD keyword to reference parent dataitem fields, not direct field references. The model wrote 'DataItemLink = "Bill-to Customer No." = Customer."No."' but should have written 'DataItemLink = "Bill-to Customer No." = FIELD("No.")'. Similarly for SalesLine linking to SalesHeader.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 15 | approval-entry-document-type-enum | enum-values | 1 | CG-AL-M008 |
|
Description: The model incorrectly used 'ApprovalEntry."Document Type"::Purchase' but the Approval Entry table's Document Type field uses a different enum with values like 'Purchase Order', 'Purchase Invoice', etc., not simply 'Purchase'. Additionally, the model referenced a non-existent field 'Date-Time Approved' on the Approval Entry record - the correct field name is likely 'Last Date-Time Modified' or similar. The model lacks knowledge of the specific enum values and field names in the standard BC Approval Entry table.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 16 | jsonobject-keys-enumeration | json-object-iteration | 1 | CG-AL-M021 |
|
Description: The model attempted to enumerate JsonObject keys using an integer index with JsonObject.Get(Index, JsonToken), which is not valid AL syntax. In AL, JsonObject.Get() requires a key name (Text) as the first parameter, not an integer index. The model also incorrectly tried to use JsonToken.Path.Substring(2) to extract key names. The correct approach to iterate over JsonObject keys in AL is to use the Keys() method which returns a List of [Text], or to use SelectToken/Contains patterns.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||
| 17 | temporary-table-deleteall-scope | temporary-table | 1 | CG-AL-H003 |
|
Description: The model used TempResult.DeleteAll() to clear the temporary table, but this only deletes records that match the current filters on the record variable. Since TempResult is passed by reference from the test with pre-inserted data, and the test inserts a record with 'Line No.' = 99999 and 'Item No.' = 'DUMMY', the DeleteAll() should work. However, the real issue is that the test is looking for items with Inventory >= 100 and Unit Price > 0 in the actual Item table, and if no such items exist in the test database, the test exits early. But when items DO exist, the test fails because the model's code processes items correctly but the TempResult.SetRange and FindFirst may not find the expected item. The actual problem is that the model's code works correctly, but the test database may have items with high inventory that get the 15% discount, yet the test's SetRange on 'Item No.' after ProcessItemsWithDiscount doesn't find them because the Item record variable used to find the item initially is a different instance than what's in TempResult. The model correctly implements the logic, but there may be a data-dependent issue where the specific item found by the test query isn't being added to TempResult for some reason - possibly the Item.Inventory field returns a different value than expected (it's a FlowField that needs CalcFields).
Correct Pattern:
Incorrect Pattern:
|
||||
| 18 | volume-discount-return-value | business-logic-implementation | 1 | CG-AL-M002 |
|
Description: The model implemented ApplyVolumeDiscount to return the discount amount instead of the discounted total. The task clearly states 'apply tiered discounts' and the tests expect the function to return the order total AFTER the discount is applied (e.g., 500 returns 500, 2000 returns 1900, 10000 returns 9000). The model incorrectly returns just the discount amount (e.g., for 500 it returns 0, for 2000 it returns 100, for 10000 it returns 1000).
Correct Pattern:
Incorrect Pattern:
|
||||