You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-json-schema.md
+242-4Lines changed: 242 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -91,10 +91,12 @@ Adds a new field.
91
91
92
92
JSON values:
93
93
94
-
-**fieldType** - The field type can be set to **Text**, **Note**, **Number**, **Boolean**, **User**, or **DateTime**.
94
+
-**fieldType** - The field type can be set to **Text**, **Note**, **Number**, **Boolean**, **User**, or **DateTime**. For other data types see the addSPFieldXml action.
95
95
-**displayName** - The display name of the field.
96
+
-**internalName** - An optional attribute. If provided, specifies the internal name of the field. If not provided, the internal name will be based on the display name.
96
97
-**isRequired** - True if this field is required to contain information; otherwise, false.
97
98
-**addToDefaultView** - True if the field will be added to the default view; otherwise, false.
99
+
-**enforceUnique** - An optional attribute that defaults to false. If true, then all values for this field must be unique.
98
100
99
101
Example:
100
102
@@ -125,9 +127,193 @@ Example:
125
127
}
126
128
```
127
129
130
+
### addSPFieldXml
131
+
132
+
Enables defining fields and their elements using Collaborative Application Markup Language (CAML). For reference see: https://msdn.microsoft.com/en-us/library/office/aa979575.aspx
133
+
134
+
Currently these field constructs cannot be designated as site columns nor added to content types.
135
+
136
+
JSON value:
137
+
138
+
-**schemaXml** - The CAML block to define the field.
139
+
-**addToDefaultView** - True if the field will be added to the default view; otherwise, false.
Defines and adds a view to the list. Use this action to specify the desired columns and how you want the list items displayed (using a CAML query). Subactions allow you to specify row limits, whether the view is paged, and recurses over items in nested folders or not. You can also designate your constructed view as the default.
153
+
154
+
JSON value:
155
+
156
+
-**name** - The name of the view.
157
+
-**viewFields** - an array of the internal names of the fields in your view.
158
+
-**query** - A CAML query string that contains the where clause for the view's query. See https://msdn.microsoft.com/en-us/library/ms462365
159
+
-**rowLimit** - The row limit of the view.
160
+
-**isPaged** - Specifies whether the view is paged.
161
+
-**makeDefault** - If true, the view will be made the default for the list; otherwise, false.
162
+
-**scope** - An optional setting to specify the scope of the view. For more details see See https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spviewscope.aspx
Removes a view from a list. This action can also be used to remove a view applied by the site template.
187
+
188
+
JSON value:
189
+
190
+
-**name** - The name of the view to remove.
191
+
192
+
Example:
193
+
194
+
```json
195
+
{
196
+
"verb": "removeSPView",
197
+
"name": "All Items"
198
+
}
199
+
```
200
+
201
+
### createSiteColumn
202
+
203
+
Defines a new site column that can then be associated to a list directly or using the addContentType action.
204
+
205
+
JSON value:
206
+
207
+
> [!NOTE]
208
+
> When referencing the content type ID only one of the three references are required - ID, parentName, or parentId
209
+
210
+
-**fieldType** - The type of column to add. Supported values - like SPField - are Text, Note, Number, Boolean, User, and DateTime. For other data types refer to the addSPFieldXml script action.
211
+
-**internalName** - The internal name of the site column.
212
+
-**displayName** - The display name of the site column.
213
+
-**isRequired** - True if this field is required to contain information; otherwise, false.
214
+
-**group** - An optional attribute to designate the column group.
215
+
-**enforceUnique** - An optional attribute that defaults to false. If true, then all values for this field must be unique.
216
+
217
+
Example:
218
+
219
+
```json
220
+
{
221
+
"verb": "createSiteColumn",
222
+
"fieldType": "User",
223
+
"internalName": "siteColumn4User",
224
+
"displayName": "Project Owner",
225
+
"isRequired": false
226
+
}
227
+
```
228
+
229
+
### addSiteColumn
230
+
231
+
Subaction to add a previously defined site column directly to a list or content type (exisiting or created through the site script).
232
+
233
+
> [!NOTE]
234
+
> This action can be used to add created site columns to a list or content type.
235
+
236
+
JSON value:
237
+
238
+
-**internalName** - The internal name of the site column to add.
239
+
240
+
Example:
241
+
242
+
```json
243
+
{
244
+
"verb": "addSiteColumn",
245
+
"internalName": "siteColumnUser"
246
+
}
247
+
```
248
+
249
+
### removeSiteColumn
250
+
251
+
Subaction to remove a site column from a list or content type.
252
+
253
+
JSON value:
254
+
255
+
-**internalName** - The internal name of the site column to remove.
256
+
257
+
Example:
258
+
259
+
```json
260
+
{
261
+
"verb": "removeSiteColumn",
262
+
"internalName": "siteColumnUser"
263
+
}
264
+
```
265
+
266
+
### createContentType
267
+
268
+
Defines a new content type that can then be associated to a list using the addContentType action.
269
+
270
+
JSON value:
271
+
272
+
> [!NOTE]
273
+
> When referencing the content type ID only one of the three references are required - ID, parentName, or parentId
274
+
275
+
-**name** - The name of the content type to create.
276
+
-**description** - The optional description of the content type.
277
+
-**parentName** - Name of the parent content type.
278
+
-**parentId** - ID of the parent content type.
279
+
-**id** - ID of the content type.
280
+
-**hidden** - Specifies whether the content type is visible or hidden.
281
+
-**subactions** - Specifies subactions to run on the content type. These are used to designate the site columns to add.
282
+
283
+
Example:
284
+
285
+
```json
286
+
{
287
+
"verb": "createContentType",
288
+
"name": "Contoso Projects",
289
+
"description": "custom list content type",
290
+
"parentName": "Item",
291
+
"hidden": false,
292
+
"subactions":
293
+
[
294
+
{
295
+
"verb": "addSiteColumn",
296
+
"internalName": "siteColumn1Text"
297
+
},
298
+
{
299
+
"verb": "addSiteColumn",
300
+
"internalName": "siteColumn2Number"
301
+
},
302
+
{
303
+
"verb": "addSiteColumn",
304
+
"internalName": "siteColumn3Note"
305
+
}
306
+
]
307
+
}
308
+
```
309
+
128
310
### addContentType
129
311
130
-
Adds a content type to the list. Currently these are limited to only the default content types included in the site template.
312
+
Adds a content type to the list. Currently these are limited to the default content types included in the site template or ones defined in a script using the createContentType action.
313
+
314
+
315
+
> [!NOTE]
316
+
> Currently we do not support adding enterprise content types.
131
317
132
318
JSON value:
133
319
@@ -274,6 +460,9 @@ Example:
274
460
275
461
Use the **createPage** verb to create a new page on the site.
276
462
463
+
> [!NOTE]
464
+
> The createPage site script action is in preview and is subject to change. It is not currently supported for use in production environments.
465
+
277
466
JSON values:
278
467
279
468
- **fileName** - The name of the file.
@@ -304,7 +493,10 @@ Example:
304
493
305
494
## Set a site logo
306
495
307
-
Use the **setSiteLogo** verb to specify a logo for your site. This action only works on the communication site template (68).
496
+
Use the **setSiteLogo** verb to specify a logo for your site.
497
+
498
+
> [!NOTE]
499
+
> This action only works on the communication site template (68).
308
500
309
501
JSON value:
310
502
@@ -326,13 +518,14 @@ Use the **joinHubSite** verb to join the site to a designated hub site.
326
518
JSON value:
327
519
328
520
-**hubSiteId** - The ID of the hub site to join.
521
+
-**name** - An optional string specifying the name of the hub site.
329
522
330
523
Example:
331
524
332
525
<!-- TBD: add link to Dave's hub site documentation -->
333
526
334
527
> [!NOTE]
335
-
> Hub sites are a new feature that are just rolling out to customers in Targeted Release in March 2018.
528
+
> Hub sites are a new feature that are just rolling out to customers in Targeted Release in March 2018. This action might not be available for use in your environment. To learn more check out https://docs.microsoft.com/en-us/sharepoint/dev/features/hub-site/hub-site-overview
336
529
337
530
```json
338
531
{
@@ -341,6 +534,27 @@ Example:
341
534
}
342
535
```
343
536
537
+
## installSPFXSolution
538
+
539
+
Use the **installSPFXSolution** action to register a deployed solution from the app catalog.
540
+
541
+
JSON values:
542
+
543
+
-**id** - The id of the catalog solution.
544
+
545
+
Example:
546
+
547
+
> [!NOTE]
548
+
> To get the solution ID login to a site using Connect-PnPOnline cmdlet and then run Get-PnPApp. This will return a list of your deployed solutions.
549
+
550
+
```json
551
+
{
552
+
"verb": "installSPFXSolution",
553
+
"id": "d40e4edc-a6da-4cd8-b82d-bba970976803"
554
+
}
555
+
```
556
+
557
+
344
558
## Trigger a flow
345
559
346
560
Use the **triggerFlow** verb to kick off a custom flow.
@@ -365,6 +579,30 @@ Example:
365
579
}
366
580
}
367
581
```
582
+
583
+
## setRegionalSettings
584
+
585
+
Use the **setRegionalSettings** action to configure the regional settings of the site (/_layouts/15/regionalsetng.aspx).
586
+
587
+
JSON values:
588
+
589
+
-**timeZone** - A number specifying the time zone. For list of permissible values see https://msdn.microsoft.com/library/microsoft.sharepoint.spregionalsettings.timezones.aspx
590
+
-**locale** - A number specifying the culture LCID. For list of permissible values see https://msdn.microsoft.com/en-us/library/ms912047(v=winembedded.10).aspx
591
+
-**sortOrder** - A number specifying the sort order. For list of permissible values see https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spregionalsettings.collation.aspx
592
+
-**hourFormat** - Specifies whether the site should use 12-hour or 24-hour time format.
593
+
594
+
Example:
595
+
596
+
```json
597
+
{
598
+
"verb": "setRegionalSettings",
599
+
"timeZone": 2, /* Greenwich Mean Time */
600
+
"locale": 1050, /* Croatia */
601
+
"sortOrder": 6, /* Croatian */
602
+
"hourFormat": "24"
603
+
}
604
+
```
605
+
368
606
## setSiteExternalSharingCapability
369
607
370
608
Use the **setSiteExternalSharingCapability** to manage guest access. For details on these settings refer to: https://support.office.com/en-us/article/Manage-external-sharing-for-your-SharePoint-Online-environment-C8A462EB-0723-4B0B-8D0A-70FEAFE4BE85
0 commit comments