openrouter/x-ai/grok-code-fast-1
All Known Shortcomings
Sorted by occurrence count (most frequent first)
| # | Concept | AL Concept | Count | Affected Tasks |
|---|---|---|---|---|
| 1 | interface-definition-syntax | interface-definition | 2 | CG-AL-E008, CG-AL-H023 |
|
Description: The model failed to generate any valid AL code for the interface definition. The compilation errors (AL0107: identifier expected, AL0104: syntax errors) indicate the model produced malformed or empty code instead of a proper AL interface definition. The task asked for an interface with ID 70000, but AL interfaces don't use numeric IDs - they use quoted names. The model appears to have either generated nothing meaningful or used incorrect syntax for defining an AL interface.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0107, AL0185 |
||||
| 2 | json-value-extraction-methods | json-handling | 2 | CG-AL-H014, CG-AL-M020 |
|
Description: The model generated incorrect AL code for JSON value extraction. The errors show: 1) Using JsonObject as second argument to Get() instead of 'var JsonToken' - the Get method requires a JsonToken variable to receive the value. 2) Passing Text to a method expecting Boolean - likely misusing an overload of a JSON getter method. The model doesn't understand that AL's JsonObject.Get() method requires passing a JsonToken variable by reference, then converting that token to the appropriate type (AsObject(), AsValue().AsText(), etc.).
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0133 |
||||
| 3 | event-subscriber-xrec-parameter | event-subscriber-definition | 1 | CG-AL-E010 |
|
Description: The model generated an event subscriber for OnAfterInsertEvent on the Item table but incorrectly included an 'xRec' parameter. The OnAfterInsertEvent does not have an xRec parameter because there is no 'before' record state during an insert operation - the record didn't exist before. The xRec parameter is only available for events like OnAfterModifyEvent or OnBeforeModifyEvent where there's a previous state to compare against.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0282 |
||||
| 4 | table-definition-syntax | table-definition | 1 | CG-AL-H003 |
|
Description: The model failed to generate valid AL code. The compilation errors indicate the model produced malformed table definition syntax - it appears to have started a table object but immediately had syntax errors at line 4 where 'fields' keyword was expected. The model likely generated incomplete or incorrectly structured AL code for the table definition, missing the proper 'fields { }' block structure required in AL table objects.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 5 | query-object-syntax | query-definition | 1 | CG-AL-H011 |
|
Description: The model generated syntactically invalid AL code for a query object. The compilation errors indicate syntax problems at line 11 (identifier expected, '=' expected) and line 19 ('}' expected), suggesting the model doesn't understand the proper structure of AL query objects including dataitem definitions, column definitions with aggregation methods, and filter elements. The 'Generated code not found' message in the output suggests the code was malformed enough that it couldn't be properly captured, but the compilation errors confirm code was generated with fundamental syntax issues.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0107 |
||||
| 6 | query-crossjoin-dataitem-hierarchy | query-dataitem-structure | 1 | CG-AL-H017 |
|
Description: The model failed to understand AL Query CrossJoin structure. In AL queries, CrossJoin requires proper dataitem nesting - you cannot have multiple dataitems at the same level (AL0342 error). The model placed dataitems at the same level instead of nesting them properly. Additionally, the model incorrectly set DataItemLink on a top-level DataItem (AL0331) and had column source issues (AL0345, AL0353). AL queries with CrossJoin still require hierarchical dataitem structure where child dataitems are nested inside parent dataitems.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0342 |
||||
| 7 | code-generation-failure | codeunit-structure | 1 | CG-AL-H022 |
|
Description: The model failed to generate any valid AL code for the codeunit. The compilation errors show 'Semicolon expected' at lines 88 and 91, and 'App generation failed', indicating the model produced malformed or incomplete AL code. The 'Generated code not found' message suggests the model either didn't output proper code or the code was so malformed it couldn't be captured. This is a fundamental failure to produce the required codeunit with RecordRef/FieldRef procedures.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0111 |
||||
| 8 | complex-report-structure | report-definition | 1 | CG-AL-M007 |
|
Description: The model failed to generate valid AL code for a complex report. The compilation errors indicate a syntax error at line 70 with a missing closing brace '}', suggesting the model produced incomplete or malformed report structure. The task required creating a 'Sales Performance Analysis' report with multiple data items, complex calculations, triggers, and a request page. The model's generated code was either incomplete or had structural issues that prevented compilation.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0104 |
||||
| 9 | logmessage-overload-signature | telemetry-logging | 1 | CG-AL-M008 |
|
Description: The model generated code that calls LogMessage with 5 arguments, but the AL built-in LogMessage method requires either 8-10 arguments (with individual dimension parameters) or 6 arguments (with a Dictionary). The model doesn't understand the correct signature for the LogMessage telemetry function in AL. Additionally, the model made type conversion errors trying to assign Text values to Boolean variables.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0126 |
||||
| 10 | activity-log-field-names | standard-table-fields | 1 | CG-AL-M009 |
|
Description: The model attempted to use the 'Activity Log' table for logging/audit trail functionality but used incorrect field names. The model referenced 'Activity Log Context' and 'Activity Description' fields which do not exist in the standard 'Activity Log' table in Business Central. The actual Activity Log table has different field names - it uses 'Context' (not 'Activity Log Context') and 'Description' (not 'Activity Description'). The model hallucinated field names that don't exist in the BC standard table schema.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0132 |
||||
| 11 | foreach-json-key-iteration | json-object-iteration | 1 | CG-AL-M021 |
|
Description: The model attempted to use 'Key' as a variable or keyword in a foreach loop context when iterating over JsonObject keys. In AL, you cannot use 'Key' directly as a loop variable name without proper declaration, and the syntax for iterating over JsonObject keys requires using the Keys() method which returns a List of Text, then iterating with 'foreach KeyName in KeyList do'. The model likely wrote something like 'foreach Key in JsonObj.Keys do' or used 'Key' incorrectly in the iteration context.
Correct Pattern:
Incorrect Pattern:
Error Codes: AL0519 |
||||