26.3.8. Version deletion
You might need to delete one, several, or all infobase versions. To do this, use the DeleteVersions() method and the EraseInfoBaseData global context method.
The DeleteVersions() method allows you to do the following:
- Delete all historical data for any configuration object. To do this, call the method and specify the configuration object as its parameter: DeleteVersions(Metadata.Catalogs.Goods).
- Delete data for any configuration object before the specified date: DeleteVersions(Metadata.Catalogs.Goods, BegOfYear(CurrentDate())).
- Delete the version set of any data object: DeleteVersions(ObjectRef, StartOfRange, EndOfRange).
- Delete all versions of any data object before the specified date: DeleteVersions(ObjectRef, BegOfYear(CurrentDate())).