# PerTenantExtensionCop Error PTE0002
Field ID must be in free range.
## Description
Field ID must be in free range.
## Remarks
This rule validates that all table field IDs defined in your extension are within range 50,000-99,999 that is allocated for per-tenant extensions. For more information about the ID ranges for extensions, see ../devenv-object-ranges.
> NOTE
> When a new AL table, you are also allowed to use the range 0-49,999 for the ID of your table fields.
## How to fix this diagnostic?
You must change the ID of the object or table field validated to use an ID within the range 50,000-99,999.
## Code examples triggering the rule
### Example 1 - A table field ID outside the range 50,000-99,999
```al
table 50100 MyTable
{
    fields
    {
        field(1000000; MyField; Integer) { }
    }
}
```
The table field MyField has the ID `1000000` which is not valid because it is outside the allowed range.
### Example 2 - A table extension field ID in the ID range 0-49,999
```al
tableextension 50100 MyTableExt extends MyTable
{
    fields
    {
        field(10; MyExtField; Integer) { }
    }
}
```
## Code examples not triggering the rule
### Example 1 - A table field ID within the range 50,000-99,999
```al
table 50100 MyTable
{
    fields
    {
        field(50100; MyField; Integer) { }
    }
}
```
The table field MyField has the ID `50100` which is valid because it is within the allowed range.
### Example 2 - A table field ID within the range 0-49,999
```al
table 50100 MyTable
{
    fields
    {
        field(1; MyField; Integer) { }
    }
}
```
The table field MyField has the ID `1` which is valid because it is within the range 0-49,999.
## Related information
PerTenantExtensionCop Analyzer<pertenantextensioncop>
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

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/pertenantextensioncop-pte0002, 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. https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/pertenantextensioncop-pte0002/
