ObsoleteState Property

Marks whether the object or element is or will become obsolete.

Applies to

  • Table objects
  • Table fields
  • Table keys
  • Codeunit
  • Enum
  • EnumValue
  • Page
  • PageAction
  • PageActionArea
  • PageActionGroup
  • PageActionSeparator
  • PageArea
  • PageChartPart
  • PageField
  • PageGroup
  • PageLabel
  • PagePart
  • PageSystemPart
  • Query
  • QueryColumn
  • QueryDataItem
  • QueryFilter
  • Report
  • ReportColumn
  • ReportDataItem
  • RequestPage
  • XmlPort

Property Value

The following table describes the property values.

Value Description
No Not obsolete. This is the normal/default setting.
Pending Will be obsolete in a future release. This setting has no effect on the current use of the table, field, or key in code.
Removed Is obsolete. Applies to tables and table fields; the element is not deleted from the database, however, references to the element in code are only allowed in upgrade codeunits. References from other objects will result in a runtime error.


ObsoleteState = Pending;


By coding against this property, you can use this property as a way to communicate through code to other developers which objects and elements will become obsolete over time and those which are already obsolete, enabling them to adjust their application code accordingly.


When developing using Dynamics NAV Development Environment (CSIDE), you do not get warnings or errors when you compile objects that reference table objects, fields, or keys that are marked as Pending or Removed. ObsoleteState property is only detected by the AL compiler, which will return warnings for references to elements marked as Pending and errors for references to elements marked as Removed.

See Also

ObsoleteReason Property
Upgrade Codeunits