{"title":"CodeCop Info AA0232","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/codecop-aa0232/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/codecop-aa0232, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/codecop-aa0232","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"You can potentially increase performance if fields that are used in FlowFields are added to SumIndexedFields of the corresponding key.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"CodeCop Info AA0232","slug":"codecop-info-aa0232","at":0,"chars":3483},{"level":2,"title":"Description","slug":"description","at":66,"chars":150},{"level":2,"title":"Reason for the rule","slug":"reason-for-the-rule","at":216,"chars":520},{"level":2,"title":"Bad code example","slug":"bad-code-example","at":736,"chars":1201},{"level":2,"title":"Good code example","slug":"good-code-example","at":1937,"chars":1409},{"level":2,"title":"Related information","slug":"related-information","at":3346,"chars":137}],"text":"# CodeCop Info AA0232\nThe FlowField of a table should be indexed.\n## Description\nYou can potentially increase performance if fields that are used in FlowFields are added to SumIndexedFields of the corresponding key.\n## Reason for the rule\n> NOTE\n> Be aware that this rule can, in some cases, cause false warnings even though you have addressed any performance issues by adding SIFT indices. The rule will be fixed in a future release.\nWhen there are performance issues on List pages, the root cause is often that they display FlowFields defined on top of tables that are inadequately indexed - these are typically missing SIFT indices.\nAs any FlowField potentially can be shown on a page, make sure that they're all adequately indexed.\n## Bad code example\n```al\ntable 18 Customer\n{...\n    fields\n    {...\n        field(97; \"Debit Amount\"; Decimal)\n        {\n            ...\n            CalcFormula = Sum (\"Detailed Cust. Ledg. Entry\".\"Debit Amount\" WHERE(\"Customer No.\" = FIELD(\"No.\"),\n                                                                                 \"Entry Type\" = FILTER(<> Application),\n                                                                                 \"Initial Entry Global Dim. 1\" = FIELD(\"Global Dimension 1 Filter\"),\n                                                                                 \"Initial Entry Global Dim. 2\" = FIELD(\"Global Dimension 2 Filter\"),\n                                                                                 \"Posting Date\" = FIELD(\"Date Filter\"),\n                                                                                 \"Currency Code\" = FIELD(\"Currency Filter\")));\n            FieldClass = FlowField;\n            ...\n        }\n        ...\n    }\n    keys { ... }\n    ...\n}\ntable 379 \"Detailed Cust. Ledg. Entry\"\n{...\n    fields { ... }\n    keys\n    {\n        key(Key1; \"Entry No.\")\n        {\n            Clustered = true;\n        }\n    }\n    ...\n}\n```\n## Good code example\n```al\ntable 18 Customer\n{...\n    fields\n    {...\n        field(97; \"Debit Amount\"; Decimal)\n        {\n            ...\n            CalcFormula = Sum (\"Detailed Cust. Ledg. Entry\".\"Debit Amount\" WHERE(\"Customer No.\" = FIELD(\"No.\"),\n                                                                                 \"Entry Type\" = FILTER(<> Application),\n                                                                                 \"Initial Entry Global Dim. 1\" = FIELD(\"Global Dimension 1 Filter\"),\n                                                                                 \"Initial Entry Global Dim. 2\" = FIELD(\"Global Dimension 2 Filter\"),\n                                                                                 \"Posting Date\" = FIELD(\"Date Filter\"),\n                                                                                 \"Currency Code\" = FIELD(\"Currency Filter\")));\n            FieldClass = FlowField;\n            ...\n        }\n        ...\n    }\n    keys { ... }\n    ...\n}\ntable 379 \"Detailed Cust. Ledg. Entry\"\n{...\n    fields { ... }\n    keys\n    {\n        key(Key1; \"Entry No.\")\n        {\n            Clustered = true;\n        }\n        key(Key2; \"Customer No.\", \"Entry Type\", \"Initial Entry Global Dim. 1\", \"Initial Entry Global Dim. 2\", \"Posting Date\", \"Currency Code\")\n        {\n            SumIndexFields = \"Debit Amount\"\n        }\n    }\n    ...\n}\n```\n## Related information\nCodeCop Analyzer<codecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}