{"title":"AppSourceCop Warning AS0086","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0086/","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/appsourcecop-as0086, 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/appsourcecop-as0086","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":"Increasing the length of a field is not allowed as it might break the runtime behavior of dependent extensions referencing it.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Warning AS0086","slug":"appsourcecop-warning-as0086","at":0,"chars":1565},{"level":2,"title":"Description","slug":"description","at":65,"chars":142},{"level":2,"title":"Remarks","slug":"remarks","at":207,"chars":308},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":515,"chars":370},{"level":2,"title":"Code example triggering the rule","slug":"code-example-triggering-the-rule","at":885,"chars":533},{"level":2,"title":"Related information","slug":"related-information","at":1418,"chars":147}],"text":"# AppSourceCop Warning AS0086\nFields must not increase in length\n## Description\nIncreasing the length of a field is not allowed as it might break the runtime behavior of dependent extensions referencing it.\n## Remarks\nThe validation of the length of table fields was previously done with appsourcecop-as0004 and has now been split into two different rules:\n appsourcecop-as0080 - which validates against decreasing the length of fields\n appsourcecop-as0086 - which validates against increasing the length of fields\n## How to fix this diagnostic?\nReverting the change will fix this diagnostic. If increasing the length of the field is required, the recommended approach is to mark the field as Obsolete Pending<../properties/devenv-obsoletestate-property>, and in a later app version, remove that state again, and just increase the field length and remove the `Obsolete Pending` state.\n## Code example triggering the rule\nVersion 1.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(50100; MyField; Text[50]) { }\n    }\n}\n```\nVersion 2.0 of the extension:\n```al\ntable 50100 MyTable\n{\n    fields\n    {\n        field(50100; MyField; Text[150]) { }\n    }\n}\n```\nIn version 2.0, the type of the field MyField has changed from `Text[50]` to `Text[150]`. If a dependent extension uses this field, this can lead to runtime exceptions. For instance, if it assigns it to a variable of type `Text[50]`.\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}