mirror of
https://github.com/frappe/books.git
synced 2024-12-27 04:32:41 +00:00
22 lines
560 B
Markdown
22 lines
560 B
Markdown
|
# Single Documents
|
||
|
|
||
|
Single doctypes have only one instance. They are useful for using DocTypes as views or for settings.
|
||
|
|
||
|
To make a Single DocType, set the `isSingle` property as true.
|
||
|
|
||
|
Single documents are best viewed in a modal since they do not have a corresponding list view.
|
||
|
|
||
|
Values of single documents are stored in the table `SingleValue`
|
||
|
|
||
|
## API
|
||
|
|
||
|
### frappe.getSingle
|
||
|
|
||
|
Load a single document
|
||
|
|
||
|
```js
|
||
|
let systemSettings = frappe.getSingle('SystemSettings');
|
||
|
```
|
||
|
|
||
|
Since Single documents are also documents, you can update them with the `update()` method.
|