Developer Function: Server Script: siteSettings
## Overview
This object is used to read and change "Site Settings" in "「Server Script」".
## Limitations
1. Only the "When Reading Site Settings" condition can be used.
## Properties
|No|Property name|Change|Description|
|:--|:----------|:-------:|:---------------------------|
|1|DefaultViewId |○|"「Default View」" ID|
|2|[Sections](/manual/server-script-site-settings-sections)|○|Array of Section objects|
## Method
|No|Name|Description|
|:----|:----|:----|
|1|[SiteId](/manual/server-script-site-settings-site-id)|Get the [Site ID](/manual/tenant-logo) using the title of the "「Site」" as the key|
## Usage Example 1
In the following example, the view with ID 1 is set as the default view.
##### JavaScript
```
siteSettings.DefaultViewId = 1;
```
## Usage Example 2
The following example gets section information and logs the section ID and label text.
##### JavaScript
```
let sections = siteSettings.Sections;
for (let section of sections) {
context.Log(`${section.Id} ${section.LabelText}`);
}
```
## Usage Example 3
In the following example, the site ID of the site whose name is Department Master is retrieved and output to the log.
##### JavaScript
```
let siteId = siteSettings.SiteId('Department Master');
context.Log(siteId);
```
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/server-script-site-settings-sections">Developer Function: Server Script: siteSettings.Sections</a><span>10.04.2024 up</span></li>
<li><a href="/en/manual/server-script-site-settings-site-id">Developer Function: Server Script: siteSettings.SiteId</a><span>10.04.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />