Open patrickabel opened 6 years ago
Hey Patrick - per my reply on Twitter, no, we support that - and most common list types. I just tried in one of my test tenants and it was created fine; is that the whole code snippet? It looks like a closing brace is missing...
If it helps, here's a sample that should work:
{
actions: [
{
"verb": "createSPList",
"listName": "MyEventList",
"templateType": 106,
"subactions":
[
{
"verb": "setDescription",
"description": "This is an event list"
}
]
},
{
"verb": "addNavLink",
"url": "/Lists/MyEventList",
"displayName": "My Event List",
"isWebRelative": true
}
]
}
@seansquires I've tracked down the issue, sorry for crying wolf here! After a good bit of trial and error, I've discovered that my issue spawns from the site action limitation of 30 cumulative actions.
What I did not realize is that this limitation includes sub-actions so you can really hit this cap quickly with real-world scenarios. With the level of configuration that's possible now with site scripts, you could probably hit the current limitation while provisioning a single list.
Can you share any updates on this action cap being increased?
As far as i know, MS team still working on it. Also, we had a complex requirements where we had around 30 columns and 10 content types and few custom List and Libraries. We ran 30 cap limit very quickly. When it reaches this limit, the site Design doesn't throws any error. It just spins and saying applying Design and it never completes.
The other limitation I found are below.
You can include MM column as part of the script. But you cant assign a value to it. You have to assign outside of the site design.
Second thing i found is, when you re-run on a already applied site script site and if you have choice columns(with additional values), it removes the additional choice values. The same goes for MM columns. It removes the Term Set which was assigned to it.
The approach taken: We use Site Design only for the below purposes.
Hope this helps.
Thanks! Ravi
@Ravikadri agreed – I'm also extended Site Scripts with an Azure Function as you've outlined.
Worse than the limitation itself here is the fact that when hitting this limit you receive zero feedback in the UI or through PS. Hopefully, some updates in this area are on the way.
Yes, sorry if that wasn't clear - action limit is inclusive of subactions. We hear you - and relief is on the way! I shared at Ignite a new option we're rolling out where you can effectively queue/schedule larger script runs. We have a new PS command that will be rolling out by end of the month to effectively replace Invoke-SPOSiteDesign. This new Add-SPOSiteDesignTask will support up to 100K characters (so lots of actions). You can read/view details and a demo in our Ignite talk (https://myignite.techcommunity.microsoft.com/sessions/65682?source=TechCommunity) or in this past Tuesday's dev community call (https://developer.microsoft.com/en-us/sharepoint/blogs/sharepoint-dev-community-pnp-october-2018-monthly-community-call-recording/).
Ack to Ravi's notes about MM fields; there's more work to do to support this complex column type, which we're working on right now. I'm hoping to have updates here before year's end. Thanks for reporting.
I am trying to create Managed Metadata columns using site script. I used createSiteColumnXml to do the creation and got the XML for the field from SharePoint Manager.I removed the mapping to a list. Invoke-SPOSiteDesign reports an error on each column but the columns are there and appear to work. Any hints on how to find the causes. Is there a log?
Category
Expected or Desired Behavior
Based on the site script documentation, I would expect to be able to create SharePoint lists of different template types (SPListTemplateType). In trying to add an Events list (templateType: 106), this doesn't appear to be the case.
Observed Behavior
Adding the following verb to a site scripts results in the site script not executing. From the UI, the site design just gets stuck "initiating" and from PowerShell using Invoke-SPOSiteDesign, no output is returned.
{ "verb": "createSPList", "listName": "Events", "templateType": 106, "subactions": [ { "verb": "setDescription", "description": "List of Events" } ] }
Steps to Reproduce
Attempt to execute configure a site script to add a SharePoint list with templateType: 106 (Events list).
Is this not supported and the documentation is simply misleading?