AppData and versioning
AppData cannot change with the versions of the item to which it is attached.
When a content item is initially created, before it is checked in, it has the version number v0. AppData is version-independent: the v0 version has the same AppData as the last major version. Specifically:
- When a user checks out a content item, SDL Tridion Sites copies any AppData on the latest major version to the v0 version.
- If a user undoes checkout on a checked-out content item, SDL Tridion Sites removes the AppData for v0.
- When you check in a content item, creating a new major version of the item, the AppData associated with the v0 version becomes the AppData of the new major version.
It follows from this that if you want to make AppData behave like versioned data, you either set AppData only on the v0 version, or on the last major version if the item is not checked out.