4

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.

9

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

  1. If the linked Schema is not mandatory, it merely acts as a default Schema for new Components created in the Folder.
  2. If the linked Schema is mandatory, Components cannot be saved in the Folder unless they are based on this Schema.
  3. It is not possible make the linked Schema mandatory if there are Components in the Folder based on another Schema.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.