ObsoleteState Property

Version: Available or changed with runtime version 1.0.

Marks whether the object or element is or will become obsolete (deprecated).

Applies to

  • Table Field
  • Table
  • Table Key
  • Codeunit
  • Enum Type
  • Enum Value
  • Page
  • Page Action
  • Page Action Area
  • Page Action Group
  • Page Action Separator
  • Page Area
  • Page Part
  • Page System Part
  • Page Chart Part
  • Page Field
  • Page Group
  • Page Label
  • Query
  • Query Column
  • Query Filter
  • Report
  • Report Data Item
  • Report Column
  • Request Page
  • Xml Port
  • Page View
  • Profile
  • Interface
  • Control Add In
  • Permission Set

Property Value

Value Description
No Not obsolete. This is the normal/default setting.
Pending Will become obsolete in a future version.
Removed Has been made obsolete.

Syntax

ObsoleteState = Pending;

Remarks

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.

Note

When developing using Dynamics NAV Development Environment (C/SIDE), 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
Properties
Upgrade Codeunits
Obsolete Attribute