A disabled field must be defined as type “String”. When a data element has a field with the name “disabled”, the display and deletion behavior of that data element is affected.
By default all entries of the data element will be given the string value “no” for the disabled field upon creation. When the entry is deleted, rather than being removed from the database, the property of disabled will be set to the string value “yes”. Any entry for which the disabled property is not set to “no”, will not be included in any listings or searches by default. This effectively hides it from the user, but retains the data.
Disabled entries can be shown when a search query is executed which specifically includes “Disabled” as a parameter. A query such as this can be defined by adding finders, such as an auto-generated finder named “findByDisabledEq”.