Get Related Records Target

Retrieves the App ID of the Datasource app of the specified Related records field, in the record.

Desktop

kintone.app.getRelatedRecordsTargetAppId(fieldCode)

Mobile

kintone.mobile.app.getRelatedRecordsTargetAppId(fieldCode)

PARAMETER VALUE REQUIRED DESCRIPTION
fieldCode String Yes Specify the field code of the Related records field.
  • 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.
1
var related = kintone.app.getRelatedRecordsTargetAppId('reference');
  • Record List
  • Record Create
  • Record Edit
  • Record Details
  • Record Print
  • Graph
  • File Import
  • File Export
  • Plug-in config page
  • Record List
  • Record Create
  • Record Edit
  • Record Details
  • Graph
  • 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.