Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Site script actions to provision a Project Site design
{
"$schema": "schema.json",
"actions": [
{
"verb": "createSiteColumn",
"fieldType": "Text",
"internalName": "ProjectName",
"displayName": "Project Name",
"isRequired": true,
"group": "~Project Columns"
},
{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type=\"Choice\" DisplayName=\"Document Type\" Required=\"FALSE\" Format=\"Dropdown\" StaticName=\"DocumentType\" Name=\"DocumentType\"><Default>General Doc</Default><CHOICES><CHOICE>General Doc</CHOICE><CHOICE>Requirements</CHOICE><CHOICE>Design</CHOICE><CHOICE>TestPlan</CHOICE><CHOICE>Project Charter</CHOICE></CHOICES></Field>",
"group": "~Project Columns"
},
{
"verb": "createContentType",
"name": "Project Document",
"description": "Custom project document",
"parentName": "Document",
"hidden": false,
"subactions":
[
{
"verb": "addSiteColumn",
"internalName": "ProjectName"
},
{
"verb": "addSiteColumn",
"internalName": "DocumentType"
}
]
},
{
"verb": "createSPList",
"listName": "Project Documents",
"templateType": 101,
"subactions": [
{
"verb": "SetDescription",
"description": "Project Document library"
},
{
"verb": "addContentType",
"name": "Project Document"
},
{
"verb": "removeContentType",
"name": "Document"
}
]
},
{
"verb": "addNavLink",
"url": "/Project Documents",
"displayName": "Project Documents",
"isWebRelative": true
},
{
"verb": "removeNavLink",
"displayName": "Documents",
"isWebRelative": true
},
{
"verb": "removeNavLink",
"displayName": "Pages",
"isWebRelative": true
},
{
"verb": "removeNavLink",
"displayName": "Site contents",
"isWebRelative": true
},
{
"verb": "joinHubSite",
"hubSiteId": "InsertYourSharePointHubIDHere"
}
],
"version": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.