Deactivate Creatio object records to exclude them from the business logic. For example, this can be useful if the data is outdated and no longer used.
Use the feature in the Object Designer
Use the special Allow record deactivation property in the Object Designer to enable this functionality. Creatio will apply the changes after you publish the object.

The record deactivation functionality is available for all objects, but Creatio filters the records automatically only in drop-down lists, quick filters, and on the lookup selection page. Creatio does not apply the automatic filter in advanced filters, sections, and on pages that have lookup content.
Use the feature in the code
The UseRecordDeactivation parameter of the EntitySchemaQuery class enables or disables the filters by inactive records. By default, the parameter is false. If you set it to true, the select query to the object that has record deactivation enabled will contain the filter that excludes inactive records.
In this case, the resulting SQL query will look as follows: