Get Record
Contents
- Get Record ID - kintone.app.record.getId()
- Get Record Details - kintone.app.record.get()
- Get Record Field Element - kintone.app.record.getFieldElement()
- Set Record Value - kintone.app.record.set()
- Get Record Header Menu Element - kintone.app.record.getHeaderMenuSpaceElement()
- Get Space Element - kintone.app.record.getSpaceElement()
- Get Related Records Target - kintone.app.getRelatedRecordsTargetAppId()
- Get Lookup Target - kintone.app.getLookupTargetAppId()
- Get Mobile Header Element - kintone.mobile.app.getHeaderSpaceElement()
Get Record ID - kintone.app.record.getId()
Retrieves the Record ID of the currently open record.
Function
Desktop
kintone.app.record.getId()
Mobile
kintone.mobile.app.record.getId()
Parameters
none
Response
- Number or null
- Null is returned for pages where it cannot be used.
Sample
|
|
Available Pages (Desktop)
- Record Details
- Record Edit
- Record Print
Available Pages (Mobile)
- Record Details
- Record Edit
Get Record Details - kintone.app.record.get()
Retrieves record data of the currently open record in JSON format.
Function
Desktop
kintone.app.record.get()
Mobile
kintone.mobile.app.record.get()
Parameters
None
Response
- An object with record details, or null.
- Null is returned for pages where it cannot be used.
- If the API is used on the Record Create or Record Edit page, the returned data will include the current edited data.
- Attachment file data is already converted to an empty array on the Record Create and Record Edit pages.
Sample
|
|
Available Pages (Desktop)
- Record Details
- Record Create
- Record Edit
- Record Print
Available Pages (Mobile)
- Record Details
- Record Create
- Record Edit
Notes
- kintone.app.record.get and kintone.mobile.app.record.get cannot be called in the kintone.events.on handler. If you need to retrieve record data in the event handler, utilize the event object, as that has the record data inside.
Get Record Field Element - kintone.app.record.getFieldElement()
Retrieves the field element of a field in the record, by specifying the field code.
Function
Desktop
kintone.app.record.getFieldElement(fieldCode)
Mobile
kintone.mobile.app.record.getFieldElement(fieldCode)
Parameters
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
fieldCode | String | Yes | Specify the field code of the field you want to retrieve. |
Response
- A string of field elements, or null.
- Null is returned for pages where it cannot be used.
Sample
|
|
Available Pages
- Record Details
(Cannot be called on the Record edit/create page, or the notification page) - Record Print
Notes
- The retrieval of data and the DOM’s style is supported
- Changing the internal structure of the DOM may lead to features not functioning correctly after a Kintone update.
- The following fields cannot be retrieved with kintone.app.record.getFieldElement(fieldCode), and null will be returned
- Status
- Assignee
- Fields within tables
- Fields within Related records
- The following fields cannot be retrieved with kintone.mobile.app.record.getFieldElement(fieldCode), and null will be returned
- Status
- Assignee
- Tables
- Fields within tables
- Related records
- Fields within Related records
- Field groups
- Null will be returned if you specify a field you have no access to.
Set Record Value - kintone.app.record.set()
Places values inside fields of the record that is currently being edited.
Function
Desktop
kintone.app.record.set(record)
Mobile
kintone.mobile.app.record.set(record)
Parameters
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
record | JSON | Yes | Specify the record data as JSON. (The format is the same as the response for kintone.app.record.get) |
Response
None
Sample
|
|
Available Pages (Desktop)
- Record Create
- Record Edit
Available Pages (Mobile)
- Record Create
- Record Edit
Notes
- kintone.app.record.set and kintone.mobile.app.record.set cannot be called in the kintone.events.on handler.If you need to retrieve record data in the event handler, utilize the event object, as that has the record data inside.
- The following operations can be performed:
- Replacing a field value
- Make a field editable or disabled
- Set a field error
- Automatically run a lookup field
- Automatically clear a lookup field
Get Record Header Menu Element - kintone.app.record.getHeaderMenuSpaceElement()
Retrieves the empty space element of the header of the record, i.e. the space highlighted in the below image.
Function
kintone.app.record.getHeaderMenuSpaceElement()
Parameters
None
Response
- The space element of the header.
- Null is returned for pages where it cannot be used.
Sample
|
|
Available Pages
- Record Details
- Record Create
- Record Edit
Notes
- The visual aspect of this element may change unexpectedly, as the stylesheet of Kintone takes effect on it.
- We do not recommend the following changes, as Kintone may function unexpectedly when clicked:
- adding INPUT elements with TYPE attributes of “submit”
- adding BUTTON elements to empty elements
Get Space Element - kintone.app.record.getSpaceElement()
Retrieves the element of a Blank space field that you have placed inside your record form.
Function
Desktop
kintone.app.record.getSpaceElement(spaceId)
Mobile
kintone.mobile.app.record.getSpaceElement(spaceId)
Parameters
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
spaceId | String | Yes | The element ID of the Blank space field. When you place a Blank space field inside your app form, you can assign an element ID through the field’s option. |
Response
- The element of the specified Space field.
- Null is returned if the specified Space field does not exist.
- Null is returned for pages where it cannot be used.
Sample
|
|
Available Pages (Desktop)
- Record Details
- Record Create
- Record Edit
- Record Print
Available Pages (Mobile)
- Record Details
- Record Create
- Record Edit
Get Related Records Target - kintone.app.getRelatedRecordsTargetAppId()
Retrieves the App ID of the Datasource app of the specified Related records field, in the record.
Function
Desktop
kintone.app.getRelatedRecordsTargetAppId(fieldCode)
Mobile
kintone.mobile.app.getRelatedRecordsTargetAppId(fieldCode)
Parameters
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
fieldCode | String | Yes | Specify the field code of the Related records field. |
Response
- The App ID or null.
- Null is returned for the following cases:
- The specified field does not exist.
- The specified field cannot be viewed.
- The specified field is not a Related records field.
Sample
|
|
Available Pages (Desktop)
- Record List
- Record Create
- Record Edit
- Record Details
- Record Print
- Graph
- File Import
- File Export
- Plug-in config page
Available Pages (Mobile)
- Record List
- Record Create
- Record Edit
- Record Details
- Graph
Notes
- As long as you have permission to view the specified field, you can retrieve the datasource App ID even if you don’t have access to view the data in the datasource app.
Get Lookup Target - kintone.app.getLookupTargetAppId()
Retrieves the App ID of the Datasource app of the specified Lookup field, in the record.
Function
Desktop
kintone.app.getLookupTargetAppId(fieldCode)
Mobile
kintone.mobile.app.getLookupTargetAppId(fieldCode)
Parameters
PARAMETER | VALUE | REQUIRED | DESCRIPTION |
---|---|---|---|
fieldCode | String | Yes | Specify the field code of the Lookup field. |
Response
- The App ID or null.
- Null is returned for the following cases:
- The specified field does not exist.
- The specified field cannot be viewed.
- The specified field is not a Lookup field.
Sample
|
|
Available Pages (Desktop)
- Record List
- Record Create
- Record Edit
- Record Details
- Record Print
- Graph
- File Import
- File Export
- Plug-in config page
Available Pages (Mobile)
- Record List
- Record Create
- Record Edit
- Record Details
- Graph
Notes
- As long as you have permission to view the specified field, you can retrieve the datasource App ID even if you don’t have access to view the data in the datasource app.
Get Mobile Header Element - kintone.mobile.app.getHeaderSpaceElement()
Retrieves the empty space element below the header of the record for smartphones, i.e. the space highlighted in the below images.
Record List View
The retrieved element is between the View name and the Record List.
Record List View (Calendar)
The retrieved element is below the black header.
Record Details Page
The retrieved element is between the Record Title and the Details/Comments/History tabs.
Record Edit Page
The retrieved element is between the Record Title and the Details/Comments/History tabs.
Record Create Page
The retrieved element is between “New record” and the Details tab.
Function
kintone.mobile.app.getHeaderSpaceElement()
Parameters
None
Response
- The element of the empty space element below the header of the record is returned.
- Null is returned for pages where it cannot be used.
Sample
|
|
Available Pages
- Record List
- Record Details
- Record Edit
- Record Create