SOLVED

Site design and Taxonomy fields

Copper Contributor

I'm creating a site design with custom taxonomy fields, content type with these fields and a list that uses my content type. When applying the site design to a site the site columns and the content type work but adding my content type to the list results in an error "Action failed". If I remove the taxonomy fields from the content type it is applied to the list successfully.

 

Is this supported? Is there any way I can get a more detailed error?

 

My site script:

{
"$schema": "schema.json",
"actions": [
{
"verb": "setRegionalSettings",
"timeZone": 2,
"locale": 1033,
"sortOrder": 11
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type=\"Note\" DisplayName=\"Taxonomy Test_0\" StaticName=\"xx\" Name=\"xx\"
ID=
\"{22222222-2222-2222-2222-222222222222}\" ShowInViewForms=\"FALSE\" Required=\"FALSE\" Hidden=\"TRUE\"
CanToggleHidden=
\"TRUE\" />"
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type=\"TaxonomyFieldType\" DisplayName=\"Taxonomy Test\" ShowField=\"Term1033\"
Required=
\"FALSE\" EnforceUniqueValues=\"FALSE\" Group=\"Test\" ID=\"{33333333-3333-3333-333333333333}\"
SourceID=
\"{{siteid}}\" StaticName=\"TaxonomyTest\" Name=\"TaxonomyTest\" List=\"{{listid:TaxonomyHiddenList}}\"
AllowDeletion=
\"TRUE\"><Default></Default><Customization><ArrayOfProperty><Property><Name>SspId</Name>
<Value xmlns:q1=
\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q1:string\"
xmlns:p4=
\"http://www.w3.org/2001/XMLSchema-instance\">{zzzzzzzz-zzzz-zzzz-zzzzzzzzzzzz}</Value>
</Property><Property> <Name>GroupId</Name> <Value xmlns:q2=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q2:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx</Value>
</Property><Property><Name>TermSetId</Name><Value xmlns:q2=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q2:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">yyyyyyyy-yyyy-yyyy-yyyyyyyyyyyy</Value>
</Property><Property><Name>AnchorId</Name><Value xmlns:q3=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q3:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">00000000-0000-0000-0000-000000000000</Value>
</Property><Property><Name>UserCreated</Name><Value xmlns:q4=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q4:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property>
<Property><Name>Open</Name><Value xmlns:q5=
\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q5:boolean\"
xmlns:p4=
\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property><Property><Name>TextField
</Name><Value xmlns:q6=
\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q6:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">
{22222222-2222-2222-2222-2222222222}</Value></Property><Property><Name>IsPathRendered</Name>
<Value xmlns:q7=
\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q7:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">
false</Value></Property><Property><Name>IsKeyword</Name><Value xmlns:q8=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q8:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">false</Value></Property>
<Property><Name>TargetTemplate</Name></Property><Property><Name>CreateValuesInEditForm</Name>
<Value xmlns:q9=
\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q9:boolean\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">
false</Value></Property><Property><Name>FilterAssemblyStrongName</Name><Value xmlns:q10=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=\"q10:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">Microsoft.SharePoint.Taxonomy, Version=16.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c</Value></Property><Property><Name>FilterClassName</Name>
<Value xmlns:q11=
\"http://www.w3.org/2001/XMLSchema\" p4:type=\"q11:string\"
xmlns:p4=
\"http://www.w3.org/2001/XMLSchema-instance\">Microsoft.SharePoint.Taxonomy.TaxonomyField</Value>
</Property><Property><Name>FilterMethodName</Name><Value xmlns:q12=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q12:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">GetFilteringHtml</Value></Property>
<Property><Name>FilterJavascriptProperty</Name><Value xmlns:q13=
\"http://www.w3.org/2001/XMLSchema\"
p4:type=
\"q13:string\" xmlns:p4=\"http://www.w3.org/2001/XMLSchema-instance\">FilteringJavascript</Value>
</Property></ArrayOfProperty></Customization></Field>"

},
{
"verb": "createContentType",
"name": "TestContentType",
"id": "0x01000xxx",
"hidden": false,
"subactions": [
{
"verb": "addSiteColumn",
"internalName": "xx"
},
{
"verb": "addSiteColumn",
"internalName": "TaxonomyTest"
}
]
},
{
"verb": "createSPList",
"listName": "TestList",
"templateType": 100,
"subactions": [
{
"verb": "setTitle",
"title": "Test List"
},
{
"verb": "addContentType",
"name": "TestContentType"
}
]
}
],
"bindata": {},
"version": 1
}
1 Reply
best response confirmed by m t (Copper Contributor)
Solution

Just needed to modify the taxonomy field by removing List, SourceID and the brackets in SspId and it works now.

1 best response

Accepted Solutions
best response confirmed by m t (Copper Contributor)
Solution

Just needed to modify the taxonomy field by removing List, SourceID and the brackets in SspId and it works now.

View solution in original post