What happens when we use
GetDefaultData with a
containerId that has a linked Schema?
I defined a "main" Schema but I defined this as not mandatory because I want to use another Schema but I was curious of the impact of this field.
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.Sign up to join this community
If you set a linked schema on folder and call
GetDefaultData from Coreservice it will return a new component with the schema set and appropriate component type set multimedia or normal. Mandatory has no effect on returned default data. However, it has impact on saving the component as described below.
From API docs
- If the linked Schema is not mandatory, it merely acts as a default Schema for new Components created in the Folder.
- If the linked Schema is mandatory, Components cannot be saved in the Folder unless they are based on this Schema.
- It is not possible make the linked Schema mandatory if there are Components in the Folder based on another Schema.