AutoIncrement in temporary table (PC0002)
The AutoIncrement property should not be used on fields in temporary tables. AutoIncrement is designed to generate unique values from the database sequence, which does not apply to temporary tables that only exist in memory.
Using AutoIncrement on a temporary table field is misleading and may not behave as expected.
Example
The following temporary table incorrectly uses AutoIncrement:
table 50100 MyTempTable
{
TableType = Temporary;
fields
{
field(1; EntryNo; Integer)
{
AutoIncrement = true; // AutoIncrement in temporary table [PC0002]
}
}
}
To fix this, manage the ID manually for temporary tables:
table 50100 MyTempTable
{
TableType = Temporary;
fields
{
field(1; EntryNo; Integer)
{
}
}
}