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.changedcustom_object_record.externalId.changedcustom_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
- custom_object_record.name
- custom_object_record.externalId
- custom_object_record.customField:fieldKey
- custom_object_record.fields
- custom_object_record.schema
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:
stringfor text, multiline, regexp, integer, decimal, currency, date, and dropdown fieldsbooleanfor checkbox fieldsstring[]for multiselect fields{ id: string | null, name: string | null }for lookup and parent fieldsnullwhen 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 keytitle: field titletype: normalized field typeisRequired: whether the field is requiredoptions: available options for dropdown and multiselect fieldsrelationshipTargetType: relationship target type for lookup and parent fieldsallowedCurrencies: allowed currencies for currency fields
Supported type values:
checkboxcurrencydatedecimaldropdownintegerlookupmultilinemultiselectparentregexptextunknown