{"id":1571,"date":"2018-08-08T10:50:30","date_gmt":"2018-08-08T17:50:30","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=1571"},"modified":"2021-10-18T11:28:37","modified_gmt":"2021-10-18T18:28:37","slug":"site-scripts-site-designs-summer-2018-update","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/site-scripts-site-designs-summer-2018-update\/","title":{"rendered":"Site Scripts  &amp; Site Designs \u2013 Summer 2018 Update"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1572\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/08\/blog-pic.png\" alt=\"\" width=\"618\" height=\"546\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/08\/blog-pic.png 618w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/08\/blog-pic-300x265.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/p>\n<p>As we move into summer,\u00a0we are\u00a0pleased to\u00a0announce the availability of additional site script actions and capabilities for site designs. These new actions are designed\u00a0to facilitate the programmatic configuration of common site settings and elements \u2013 and can be applied both manually through PowerShell or integrated into the SharePoint Online self-service site creation experience.<\/p>\n<p>Additionally, we are preparing for release support for a new scenario we announced\u00a0at the May SharePoint Conference \u2013 the ability\u00a0<b>to execute a site design on a site when it joins a hub<\/b>. For more details on this scenario and the newly published site script actions, read on!<\/p>\n<h2><b>New Site Script Actions<\/b><\/h2>\n<ul>\n<li><b>addPrincipalToGroup<\/b><b>\u00a0<\/b>\u2013 use this action to manage\u00a0the\u00a0addition of users and groups to default SharePoint groups\u00a0(Owners, Members, Visitors, etc.). For more information, see\u00a0<a href=\"https:\/\/support.office.com\/en-us\/article\/Understanding-SharePoint-groups-94D9B261-161E-4ACE-829E-ECA1C8CD2EB8\">Understanding SharePoint Groups<\/a>. This action can be used for licensed users, security groups, and Office 365 Groups.<\/li>\n<li><b>removeNavLink<\/b><b>\u00a0<\/b>\u2013 use this action to support those cases where a customer wants to remove select site links that are added as a part of the base template\u00a0(or to remove previously added links by using the Invoke-SPOSiteDesign\u00a0command).<\/li>\n<li><b>createSiteColumnXml<\/b><b>\u00a0<\/b>\u2013 we\u2019d recently released the\u00a0<i>addSPFieldXml<\/i>\u00a0script action to provide Field XML using Collaborative Application Markup Language (CAML). This action builds on this one to allow for the creation and inclusion of complex field types (like choice, currency, etc.) to be defined as\u00a0site columns\u00a0so they can now be referenced in list views and content types for broader use. You can also use the\u00a0<b>addSPLookupFieldXml<\/b>\u00a0script action for lookup field support. With this action, you can use Field XML to reference the desired field in the source list.<\/li>\n<\/ul>\n<h2><b>Support with additional site templates and other updates<\/b><\/h2>\n<p>We\u2019ve also added support for site scripts &amp; site designs to be applied to other SharePoint site templates, specifically our new modern team site that doesn\u2019t include an Office 365 group (STS#3); classic team site (STS#0), and classic publishing (BLANKINTRANET#0). This change will allow you to extend applying site designs to previously created sites and\u00a0will support the option to apply a site design to a site when it is joined to a hub site \u2013 a feature we announced and previewed at this year\u2019s SharePoint Conference and will be releasing later this summer!<\/p>\n<p>And there\u2019s more on the way! We have lots of updates we\u2019re working on for Ignite, so stay tuned and keep the feedback coming!<\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/declarative-customization\/site-design-json-schema\">Site Designs JSON\u202fschema documentation<\/a> has been updated accordingly in the official\u202f<a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/declarative-customization\/site-design-json-schema\">SharePoint developer documentation<\/a>. We have now also\u00a0published official JSON schema for the Site Designs, which will be kept up to date as we release new actions. You can find this schema file from\u00a0<a href=\"https:\/\/developer.microsoft.com\/en-us\/json-schemas\/sp\/site-design-script-actions.schema.json\">https:\/\/developer.microsoft.com\/en-us\/json-schemas\/sp\/site-design-script-actions.schema.json<\/a>.<\/p>\n<h2><b>New\u202fSite Script templates in GitHub<\/b><\/h2>\n<p>We\u00a0have also released new Site Script\u00a0samples to the\u00a0<a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\">GitHub<\/a>\u00a0repo,\u00a0which demonstrate\u00a0how to use these new\u00a0Site\u202fScript actions.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\/tree\/master\/samples\/site-apply-join-hubsite\">Join Hub Site<\/a>\u00a0\u2013\u00a0Soon you\u2019ll be able to apply a site design to a site when it joins a hub, but you can also use the\u00a0<i>joinHubSite<\/i>\u00a0script action to join a site to a hub on site creation or using the\u00a0<i>Invoke-<\/i><i>SPOSiteDesign<\/i>\u00a0command. We recently updated this script action to include an optional hub site name parameter.<\/li>\n<li><a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\/tree\/master\/samples\/site-apply-column-and-row-formatting\">Column and\u00a0Row\u00a0Formatting<\/a> \u2013\u00a0That\u2019s right, in addition to column formatting, you can also use site scripts to apply the new row formatting to your\u00a0<i>createList<\/i>\u00a0script actions. This sample illustrates both column formatting and applying row formatting to a custom list view.<\/li>\n<li><a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\/tree\/master\/samples\/site-apply-principal-to-spgroup\">Add\u00a0Principal to\u00a0Group<\/a> \u2013\u00a0This sample template\u00a0illustrates\u00a0the\u00a0new\u00a0<i>addPrincipalToSPGroup<\/i>\u00a0action and how to add principals (users, SGs, and O365 groups) to SharePoint roles<\/li>\n<li><a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\/tree\/master\/samples\/site-config-remove-navlinks\">Remove\u00a0Navigation Links<\/a> \u2013\u00a0This sample\u00a0illustrates\u00a0the\u00a0new\u00a0<i>removeNavLink<\/i>\u00a0action and how it can be used to remove default links added by the site template<\/li>\n<li><a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\/tree\/master\/samples\/site-create-lookup-lists-spfieldxml\">More\u00a0spfieldxml\u00a0actions<\/a>\u00a0\u2013\u00a0This sample\u00a0illustrates using Field XML to create complex list fields &#8211; including lookup columns! In addition to the previously created\u00a0<i>addSPFieldXml<\/i>\u00a0action\u00a0you can now use\u00a0<i>createSiteColumnXml<\/i><b>\u00a0<\/b>to create these\u00a0fields as site columns \u2013 and\u00a0we now have\u00a0a\u00a0<i>addSPLookupFieldXml<\/i>\u00a0that can be used to specify a dependent list for the lookup field.<\/li>\n<\/ul>\n<p>Your Site Script templates are also more than welcome in this <a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\">repository<\/a> as a reference for others in the community.<\/p>\n<h2><b>Additional resources<\/b><\/h2>\n<p>Review the\u00a0following resources\u00a0for more details on creating and using site scripts and site designs.<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/declarative-customization\/site-design-overview\">SharePoint Site Design and Site Script Overview<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/declarative-customization\/get-started-create-site-design\">Get started creating Site Designs and Site Scripts<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/declarative-customization\/site-design-json-schema\">Site Design JSON Schema<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/SharePoint\/sp-dev-site-scripts\">Reference Site Script templates in GitHub<\/a>\u202f- We do\u202f<b>welcome<\/b>\u202fcommunity contributions here!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div class=\"table-scroll-wrapper\">\n<p><span style=\"font-size: large\"><em>\u201cSharing is caring\u201d<\/em><\/span><\/p>\n<\/div>\n<hr \/>\n<p><i>SharePoint Team, Microsoft &#8211; 8th of\u00a0August 2018<\/i><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we move into summer,\u00a0we are\u00a0pleased to\u00a0announce the availability of additional Site Script actions and capabilities for Site Designs. These new actions are designed\u00a0to facilitate the programmatic configuration of common site settings and elements \u2013 and can be applied both manually through PowerShell or integrated into the SharePoint Online self-service site creation experience.<\/p>\n","protected":false},"author":69078,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[78],"class_list":["post-1571","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365-developer","tag-data-visualizations"],"acf":[],"blog_post_summary":"<p>As we move into summer,\u00a0we are\u00a0pleased to\u00a0announce the availability of additional Site Script actions and capabilities for Site Designs. These new actions are designed\u00a0to facilitate the programmatic configuration of common site settings and elements \u2013 and can be applied both manually through PowerShell or integrated into the SharePoint Online self-service site creation experience.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69078"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=1571"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1571\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=1571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=1571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=1571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}