Custom object record sidebar

The app appears in the apps tray on the right side of custom object record pages in the agent interface.

Example manifest

"location": {  "support": {    "custom_object_record_sidebar": {      "url": "assets/iframe.html",      "objectTypes": ["car", "truck"]    }  }},

For more information, see Setting the app location.

For this location, objectTypes is required and must be a non-empty array of custom object keys. This field is only supported on custom_object_record_sidebar.

In addition to the objects available in all locations, this location includes the following object:

Events

In addition to the core events, you can listen for changes to the current custom object record with the following events:

  • custom_object_record.name.changed
  • custom_object_record.externalId.changed
  • custom_object_record.customField:[field_key].changed

For custom fields, replace [field_key] with the custom field's key.

Example:

client.on('custom_object_record.customField:serial_number.changed', function(value) {  // handle field change});

The event payload is the latest value for the changed property. Value types are listed in custom_object_record.customField:fieldKey.

Custom object record object

custom_object_record

get
client.get('custom_object_record')
returns
{  "custom_object_record": {    // Custom object record properties  }}

Properties

custom_object_record.id

The custom object record id.

get
client.get('custom_object_record.id')
returns
{  "custom_object_record.id": string}

custom_object_record.name

The custom object record name.

get
client.get('custom_object_record.name')
returns
{  "custom_object_record.name": string}

custom_object_record.externalId

The custom object record external id.

get
client.get('custom_object_record.externalId')
returns
{  "custom_object_record.externalId": string}

custom_object_record.customField:fieldKey

Returns the value of the specified custom field on the current custom object record. Replace fieldKey with the custom field's key.

get
client.get('custom_object_record.customField:fieldKey') // e.g. client.get('custom_object_record.customField:serial_number')
returns
{  "custom_object_record.customField:fieldKey": value}

Possible values:

  • string for text, multiline, regexp, integer, decimal, currency, date, and dropdown fields
  • boolean for checkbox fields
  • string[] for multiselect fields
  • { id: string | null, name: string | null } for lookup and parent fields
  • null when no value is set

Note: custom_object_record.customField only supports custom field keys. For standard attributes, use custom_object_record.name and custom_object_record.externalId.

custom_object_record.fields

All record field values as a key-value object.

get
client.get('custom_object_record.fields')
returns
{  "custom_object_record.fields": {    "field_key_1": value,    "field_key_2": value  }}

custom_object_record.schema

Schema metadata for record fields.

get
client.get('custom_object_record.schema')
returns
{  "custom_object_record.schema": [{    "key": string,    "title": string,    "type": string,    "isRequired": boolean,    "options": [{      "name": string,      "value": string    }],    "relationshipTargetType": string,    "allowedCurrencies": [string]  }]}

Field schema properties:

  • key: field key
  • title: field title
  • type: normalized field type
  • isRequired: whether the field is required
  • options: available options for dropdown and multiselect fields
  • relationshipTargetType: relationship target type for lookup and parent fields
  • allowedCurrencies: allowed currencies for currency fields

Supported type values:

  • checkbox
  • currency
  • date
  • decimal
  • dropdown
  • integer
  • lookup
  • multiline
  • multiselect
  • parent
  • regexp
  • text
  • unknown