Home
Microsoft

SharePoint Site Scripts and Site Designs - April 2018 release

site-design-site-scripts-april-2018-release.png

 

We are happy to announce the availability of additional Site Script Actions for SharePoint Online Site Designs and Site Scripts. These new actions will enable you to further configure automatically the newly created site collections for your employees and will reduce the requirements of having external services integrated with the provisioning process. We will keep on introducing new Site Script Actions also in future, so please keep the feedback coming, so that we can address also your requirements.

 

  • Site Settings
    • setRegionalSettings - Used to configure the regional settings of the site
    • setSiteExternalSharingCapability - Used to manage guest access
  • Lists & Libraries
    • createSiteColumn Defines a new site column that can then be associated to a list directly or using the addContentType action
    • addSiteColumn Subaction to add a previously defined site column directly to a list or content type
    • createContentType Defines a new content type that can then be associated to a list using the addContentType action
    • addSPView Defines and adds a view to the list
    • addSPFieldXml Enables defining fields and their elements using Collaborative Application Markup Language (CAML)
    • Additional field properties: internal name, group, enforce unique
  • Apps & Solutions
    • installSPFxSolution - Install add-in or SharePoint Framework solution from the tenant app catalog
    • Associate SharePoint Framework extension action also coming soon
  • Miscellaneous
    • triggerFlow action supports additional site properties
    • joinHub action has now also name parameter
    • Invoke-SPOSiteDesign cmdlet to apply Site Design to an existing site (also supported through APIs)
    • site design default preview image

Site Designs JSON schema documentation has been updated accordingly in the official SharePoint developer documentation. We will be publishing also official JSON schema for the Site Designs within following weeks, which will be kept up to date as we release new actions.

New Site Script templates in GitHub

We have also released new Site Script templates in GitHub, which demonstrate the usage of now introduced new Site Script actions. 

Additional resources

See following resources on the covered topics.

“Sharing is caring”


SharePoint Team, Microsoft - 10th of April 2018 - Cross-posted from dev.office.com/blogs

7 Comments
Microsoft

Thanks to everyone that attended this morning's call! In case you missed it, we'll post the recording within the next 24h at

http://aka.ms/spdev-videos, but in the meantime, check out the above links for details on the updates - as well as the new samples posted to the GitHub repo. 

To a few of the questions that we missed on the call: 

 

  • Site designs are currently only available for application to modern site templates (Group-connected team & communication sites). We are evaluating extending this to other templates and will share more as soon as we can.
  • Content type support is limited to those included in the site template or defined using the new createContentType action. We are evaluating extending to support other content types (like those defined in a content type hub).
  • Site script action limit: is currently limited to 30 (inclusive of sub-actions), but yes, we understand that as more actions become available for use in scripts this limit will need to be adjusted. We are looking at ways to do this in a performant way and keep web front end load to a minimum. Thanks for the feedback on this one!
  • Thanks for the feedback re: "export & share/reuse" site script scenarios! We definitely have these in our roadmap and will share more details as soon as we can.
  • Yes, we still need to enable (a) making a field defined using Field XML a site column and (b) providing option to reference it in a declarative content type action. This work is in plan.
  • I'd love to hear more feedback/details on multi-lingual scenarios.
  • You can use the isDefault clause to apply a site design to the base template (one per - team and comm); this would ensure that associated script gets applied when a site is created from non-SP entry points, like OWA and Teams. We are working w/ our product partners to provide ways to support other published designs. Note: we don't currently support hiding the default site templates, so we recommend using this approach to "customize the default".
  • Yes, setting a theme was one of the first actions we built! Note that these are "company themes" - custom ones that must be first uploaded to your tenant gallery (check out this set of articles for more details: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-theming/sharepoint-si...). Note: if you use the joinHub action in your site script, that associated site will inherit the hub site theme (so the applyTheme script action isn't necessary...and in fact, would be overwritten by the hub site association).

 

Microsoft

Happy Friday! A few additional notes on the feature and release details this week. 

  • The call recording from Tuesday's monthly community call has been posted: https://dev.office.com/blogs/sp-dev-april-2018-monthly-community-call-recording 
  • Thanks for the feedback on script and site design limits. We're excited you want more room here. We are continually evaluating these and looking at ways to optimize the mechanics so these limits don't get in the way of you fulfilling your scenarios. The current limits are as follows: 
    • Site Scripts: each script has a 20K character limit. We currently only allow 30 site scripts / tenant, but based on feedback are looking at adjusting this.
    • Site Designs: each site design is limited to 30 cumulative actions (this is inclusive of sub-actions). We currently only allow 20 site designs / tenant. We are looking to increase these limits, esp. as the awesome new set of actions requires a higher ceiling.
  • Do check out the some of the new samples in GitHub - and contribute your own. We've also heard that folks would like more detail on how to leverage Flow and the additional properties in the triggerFlow action so we'll accompany that sample w/ an article write-up. Stay tuned!
  • Share your feedback! Please ask questions here in the tech community - and advocate your suggestions in either the sites & collaborations or SharePoint dev platform  UserVoice forums (we've conveniently added "site scripts & site designs" categories to both!)
Occasional Contributor

Is there any way to disable themes or disable "Change the look" from sharepoint online classic sites?

We are using branding on Classic sites. This feature can risk our branding with this feature enabled at Classic sites .

 

Microsoft

Hi @Savita Mittal - are you referring to the classic "change the look" feature - or the modern one (which is just rolling out to classic templates now, but isn't past Target Release customers)? You cannot disable the classic theming feature, but the modern theming experience does support disabling the out-of-box "SharePoint" themes and restricting the view only to your own. Also, while this modern component brings new capabilities and performance improvements, we acknowledge that it can conflict w/ older, custom theming solutions so it can be disabled (see https://aka.ms/spsitetheming for details), but again, this won't disable or remove the classic theming experience. HTH.

Occasional Contributor

@Sean Squires Thanks for the response. Yes I am referring to the classic "change the look" feature.

We have custom branding on the portal and we are using classic sites. With this feature enabled user can try to apply theme which can mess up the custom branding. So I am looking ways to disable this option.


New Contributor

I have been following a couple of the posts and webinars regarding Site designs and Site Scripts. Using the examples in the sessions, I have tried to add a site script to my tenant, but keep encountering an error - "Unexpected character encountered while parsing value: $. Path ' ', line 0, position 0. At line:1 char:1

 

I successfully added a script, once. The same one that continues to throw this error. I am using the latest SharePoint Online Management Shell. I have removed all Site Scripts and Site designs from the tenant. I am trying to be able to do this on a consistent basis, but have only succeeded one time. Not sure why I continue to get this error.

Frequent Contributor

Hi @Sean Squires

 

Is there a plan to implement enterprise content types with Site designs and Site scripts.  Also, do envisage using Site Actions and Site Scripts to ever trigger a flow via the New Page / Article drop down. I think there could be a few use cases for this.