Boat anchors
Another typical anti-pattern is a boat anchor. This Pattern is implemented by leaving code or metadata in your application that is no longer used.
There are at least a dozen examples of boat anchors in the standard Microsoft Dynamics NAV code. One of them is the AltSearchField
property in the Master Data tables, as shown:
This property was used by the classic client. When a field has a table relation with the primary key of another table, a user can also type the value of AltSeachField
, and the client will automatically search in both the columns.
Since the introduction of the Role Tailored Client, this mechanism has been replaced by the DropDown Field Group.
Other examples can be found in the Journal Posting Codeunits, as in this screenshot:
The OnRun
trigger was used before Navision Software introduced Dimensions in version 3.0. After its introduction, the Dimensions had to be passed and the RunWithCheck
function was implemented. However, when Dimensions was refactored...