-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
When applying a Site Design on a subsite any columns available to the site should be able to be used in a Site Design.
Observed Behavior
When applying a Site Design to a sub site that creates a content type with a reference to a Site Column the design will fail with an error that "One or more of the properties on this action has an invalid type." Additionally if this script also creates a column a duplicate column will be created at the subsite level.
Steps to Reproduce
- Create a Site Design that creates a column and a content type such as the following
{
"$schema": "schema.json",
"actions": [
{
"verb": "createSiteColumn",
"fieldType": "Text",
"internalName": "mattsColumn",
"displayName": "Matt's Column",
"isRequired": false,
"group": "A"
},
{
"verb": "createContentType",
"name": "Matt's CT",
"parentName": "Item",
"hidden": false,
"subactions": [
{
"verb": "addSiteColumn",
"internalName": "mattsColumn"
}
]
}
]
}
- Apply the Site Design to a Site
- Create a subsite under the site the design was applied to in step 2.
4a. Run the Site Design on the Subsite
4b. Alternatively create a new Site Design that only creates a content type referencing the parent column
{
"$schema": "schema.json",
"actions": [
{
"verb": "createContentType",
"name": "Matt's Sub CT",
"parentName": "Item",
"hidden": false,
"subactions": [
{
"verb": "addSiteColumn",
"internalName": "mattsColumn"
}
]
}
]
}
Thanks for your contribution! Sharing is caring.
